Set the out buffer count to zero on read error.
This commit is contained in:
parent
6b395bab07
commit
63d757f044
|
@ -534,7 +534,10 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, unsigned int iField, char *buf, DWORD
|
||||||
count = 0;
|
count = 0;
|
||||||
r = IStream_Read( stm, buf, *sz, &count );
|
r = IStream_Read( stm, buf, *sz, &count );
|
||||||
if( FAILED( r ) )
|
if( FAILED( r ) )
|
||||||
|
{
|
||||||
|
*sz = 0;
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
*sz = count;
|
*sz = count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue