mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix verbose messages claiming non-existent errors
They were confusing when trying to debug other things
This commit is contained in:
@@ -504,9 +504,15 @@ struct LexerState *lexer_OpenFile(char const *path)
|
|||||||
}
|
}
|
||||||
if (!state->isMmapped) {
|
if (!state->isMmapped) {
|
||||||
/* Sometimes mmap() fails or isn't available, so have a fallback */
|
/* Sometimes mmap() fails or isn't available, so have a fallback */
|
||||||
if (verbose)
|
if (verbose) {
|
||||||
printf("File %s opened as regular, errno reports \"%s\"\n",
|
if (isStdin)
|
||||||
path, strerror(errno));
|
printf("Opening stdin\n");
|
||||||
|
else if (fileInfo.st_size == 0)
|
||||||
|
printf("File %s is empty\n", path);
|
||||||
|
else
|
||||||
|
printf("File %s opened as regular, errno reports \"%s\"\n",
|
||||||
|
path, strerror(errno));
|
||||||
|
}
|
||||||
state->index = 0;
|
state->index = 0;
|
||||||
state->nbChars = 0;
|
state->nbChars = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user