From 9f427d88523bf9ed08071ddce5b1bdedf666c73a Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 15 Jan 2006 21:17:03 +0000 Subject: [PATCH] * Fix a bug where q3cpp's include paths were not set correctly --- code/tools/lcc/cpp/include.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/tools/lcc/cpp/include.c b/code/tools/lcc/cpp/include.c index 71bd90c9..1bb88475 100644 --- a/code/tools/lcc/cpp/include.c +++ b/code/tools/lcc/cpp/include.c @@ -10,11 +10,16 @@ extern char *objname; void appendDirToIncludeList( char *dir ) { int i; + char *fqdir; + + fqdir = (char *)newstring( (uchar *)includelist[NINCLUDE-1].file, 256, 0 ); + strcat( fqdir, "/" ); + strcat( fqdir, dir ); //avoid adding it more than once for (i=NINCLUDE-2; i>=0; i--) { if (includelist[i].file && - !strcmp (includelist[i].file, dir)) { + !strcmp (includelist[i].file, fqdir)) { return; } } @@ -22,7 +27,7 @@ void appendDirToIncludeList( char *dir ) for (i=NINCLUDE-2; i>=0; i--) { if (includelist[i].file==NULL) { includelist[i].always = 1; - includelist[i].file = dir; + includelist[i].file = fqdir; break; } }