Skip to content

Commit

Permalink
Fixed the error messages output by pp_error().
Browse files Browse the repository at this point in the history
  • Loading branch information
Plombo committed Dec 8, 2010
1 parent 7704cf5 commit 21e7f4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pp_parser.c
Expand Up @@ -171,11 +171,10 @@ void pp_error(pp_parser* self, char* format, ...)
char buf[1024] = {""};
va_list arglist;

sprintf(buf, "Preprocessor error: %s: ", self->filename);
va_start(arglist, format);
vsprintf(buf, format, arglist);
va_end(arglist);
shutdown(1, buf);
shutdown(1, "Preprocessor error: %s: %s\n", self->filename, buf);
}

/**
Expand Down

0 comments on commit 21e7f4e

Please sign in to comment.