Changed ReadAt() return codes so that when ReadAt() is called with pos >= the size of the BBitmap, it returns B_ERROR instead of B_BAD_VALUE. The BBitmapTranslator expects B_ERROR to be returned in this case and will return an error code as the result to the Translate call if B_ERROR is not returned.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8678adcbd9
commit
d359a8f9ef
@ -127,9 +127,9 @@ BBitmapStream::~BBitmapStream()
|
||||
status_t
|
||||
BBitmapStream::ReadAt(off_t pos, void *buffer, size_t size)
|
||||
{
|
||||
if (!buffer || pos < 0 || pos >= fSize)
|
||||
if (!buffer || pos < 0)
|
||||
return B_BAD_VALUE;
|
||||
if (!fBitmap)
|
||||
if (!fBitmap || pos >= fSize)
|
||||
return B_ERROR;
|
||||
if (!size)
|
||||
return B_NO_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user