From 2e768fe44c8ac61e051f6796a80c11b563ba6bf8 Mon Sep 17 00:00:00 2001 From: Lance Date: Fri, 20 Mar 2009 01:12:01 +0000 Subject: [PATCH] Blub/0's fteqcc macro line fix to quote "seem to be some problems with newlines in macros (causing wrong line numbers in error/warning outputs)" git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3146 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_lex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/qclib/qcc_pr_lex.c b/engine/qclib/qcc_pr_lex.c index 80473c7bd..5b4854948 100644 --- a/engine/qclib/qcc_pr_lex.c +++ b/engine/qclib/qcc_pr_lex.c @@ -2074,6 +2074,7 @@ void QCC_PR_ConditionCompilation(void) if( s[1] == '\n' || s[1] == '\r' ) { s++; + QCC_PR_NewLine(false); *d++ = *s++; if( s[-1] == '\r' && s[0] == '\n' ) { @@ -2210,6 +2211,8 @@ int QCC_PR_CheakCompConst(void) QCC_PR_ParseError(ERR_TOOMANYPARAMS, "Too many parameters in macro call"); } else if (*pr_file_p == ')' ) plevel--; + else if(*pr_file_p == '\n') + QCC_PR_NewLine(false); // see that *pr_file_p = '\0' up there? Must ++ BEFORE checking for !*pr_file_p pr_file_p++;