mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix bug recently introduced to fatalerror().
This commit is contained in:
@@ -206,26 +206,32 @@ opt_Pop(void)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror(const char *fmt, ...)
|
verror(const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR:\t");
|
fprintf(stderr, "ERROR:\t");
|
||||||
fstk_Dump();
|
fstk_Dump();
|
||||||
fprintf(stderr, " :\n\t");
|
fprintf(stderr, " :\n\t");
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
vfprintf(stderr, fmt, args);
|
vfprintf(stderr, fmt, args);
|
||||||
va_end(args);
|
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
nErrors += 1;
|
nErrors += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
yyerror(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
verror(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fatalerror(const char *fmt, ...)
|
fatalerror(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
yyerror(fmt, args);
|
verror(fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user