Adapted to new library format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4946 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -198,7 +198,8 @@ unsigned Read8 (FILE* F)
|
||||
{
|
||||
int C = getc (F);
|
||||
if (C == EOF) {
|
||||
Error ("Read error (file corrupt?)");
|
||||
long Pos = ftell (F);
|
||||
Error ("Read error at position %ld (file corrupt?)", Pos);
|
||||
}
|
||||
return C;
|
||||
}
|
||||
@@ -325,7 +326,8 @@ void* ReadData (FILE* F, void* Data, unsigned Size)
|
||||
/* Explicitly allow reading zero bytes */
|
||||
if (Size > 0) {
|
||||
if (fread (Data, 1, Size, F) != Size) {
|
||||
Error ("Read error (file corrupt?)");
|
||||
long Pos = ftell (F);
|
||||
Error ("Read error at position %ld (file corrupt?)", Pos);
|
||||
}
|
||||
}
|
||||
return Data;
|
||||
|
||||
Reference in New Issue
Block a user