Removed NS_BASE_STREAM_EOF in favor of returning a count of 0 from Read to indicate EOF. Renamed GetLength to Available. Fixed a number of places where AppendElement's broken error code wasn't checked.
git-svn-id: svn://10.0.0.236/trunk@46637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -140,7 +140,7 @@ nsPluginInputStream::Read(char* aBuf, PRInt32 aOffset, PRInt32 aCount,
|
||||
PRUint32 segmentIndex = aOffset - element->offset;
|
||||
PRUint32 segmentAmount = element->length - segmentIndex;
|
||||
if (aCount > (PRInt32)segmentAmount) {
|
||||
return NS_BASE_STREAM_EOF; // XXX right error?
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
memcpy(aBuf, &element->segment[segmentIndex], aCount);
|
||||
// mReadCursor = segmentIndex + aCount;
|
||||
|
||||
Reference in New Issue
Block a user