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
|
||||
yyerror(const char *fmt, ...)
|
||||
void
|
||||
verror(const char *fmt, va_list args)
|
||||
{
|
||||
fprintf(stderr, "ERROR:\t");
|
||||
fstk_Dump();
|
||||
fprintf(stderr, " :\n\t");
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
va_end(args);
|
||||
fprintf(stderr, "\n");
|
||||
nErrors += 1;
|
||||
}
|
||||
|
||||
void
|
||||
yyerror(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
verror(fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void
|
||||
fatalerror(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
yyerror(fmt, args);
|
||||
verror(fmt, args);
|
||||
va_end(args);
|
||||
exit(5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user