Skip to content
Snippets Groups Projects
Commit 5fe7a7b5 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

fixed to show original error when error is called recursively

Rev: src/error.c:1.2
parent 2a501027
No related branches found
No related tags found
No related merge requests found
......@@ -70,14 +70,15 @@ struct svalue throw_value = { T_INT };
void va_error(char *fmt, va_list args)
{
char buf[2000];
static int in_error;
static char *in_error;
if(in_error)
{
char *tmp=in_error;
in_error=0;
fatal("Recursive error() calls.\n");
fatal("Recursive error() calls, original error: %s",tmp);
}
in_error=1;
in_error=buf;
VSPRINTF(buf, fmt, args);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment