diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index a6ba5b480..882a516ca 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -8518,6 +8518,7 @@ compiles the 0 terminated text, adding defintions to the pr structure */ pbool QCC_PR_CompileFile (char *string, char *filename) { + jmp_buf oldjb; if (!pr.memory) QCC_Error (ERR_INTERNAL, "PR_CompileFile: Didn't clear"); @@ -8545,21 +8546,29 @@ pbool QCC_PR_CompileFile (char *string, char *filename) QCC_PR_Lex (); // read first token + memcpy(&oldjb, &pr_parse_abort, sizeof(oldjb)); while (pr_token_type != tt_eof) { if (setjmp(pr_parse_abort)) { if (++pr_error_count > MAX_ERRORS) + { + memcpy(&pr_parse_abort, &oldjb, sizeof(oldjb)); return false; + } QCC_PR_SkipToSemicolon (); if (pr_token_type == tt_eof) - return false; + { + memcpy(&pr_parse_abort, &oldjb, sizeof(oldjb)); + return false; + } } pr_scope = NULL; // outside all functions QCC_PR_ParseDefs (NULL); } + memcpy(&pr_parse_abort, &oldjb, sizeof(oldjb)); return (pr_error_count == 0); } diff --git a/engine/qclib/qcc_pr_lex.c b/engine/qclib/qcc_pr_lex.c index 648e65307..7656334d7 100644 --- a/engine/qclib/qcc_pr_lex.c +++ b/engine/qclib/qcc_pr_lex.c @@ -572,7 +572,7 @@ pbool QCC_PR_Precompiler(void) sm = '>'; else { - QCC_PR_ParseError(0, "Not a string literal"); + QCC_PR_ParseError(0, "Not a string literal (on a #include)"); sm = 0; } pr_file_p++; diff --git a/engine/qclib/qccmain.c b/engine/qclib/qccmain.c index 67422b819..bc8cce21d 100644 --- a/engine/qclib/qccmain.c +++ b/engine/qclib/qccmain.c @@ -2806,7 +2806,7 @@ memset(pr_immediate_string, 0, sizeof(pr_immediate_string)); if (flag_caseinsensative) { - printf("Compiling without case insensativity\n"); + printf("Compiling without case sensativity\n"); pHash_Get = &Hash_GetInsensative; pHash_GetNext = &Hash_GetNextInsensative; pHash_Add = &Hash_AddInsensative;