iASL: Add check for return value from fwrite().

Ensure that the fwrite did not fail.
This commit is contained in:
Robert Moore 2012-10-25 08:50:57 -07:00
parent 49dec9f2b8
commit 33c99ff24b

View File

@ -376,7 +376,12 @@ AePrintException (
{
while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256))
{
fwrite (&SourceByte, 1, 1, OutputFile);
if (fwrite (&SourceByte, 1, 1, OutputFile) != 1)
{
printf ("[*** iASL: Write error on output file ***]\n");
return;
}
RActual = fread (&SourceByte, 1, 1, SourceFile);
Total++;
}