r488 - trunk/code/tools/lcc/cpp

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jan 15 16:17:04 EST 2006


Author: tma
Date: 2006-01-15 16:17:03 -0500 (Sun, 15 Jan 2006)
New Revision: 488

Modified:
   trunk/code/tools/lcc/cpp/include.c
Log:
* Fix a bug where q3cpp's include paths were not set correctly


Modified: trunk/code/tools/lcc/cpp/include.c
===================================================================
--- trunk/code/tools/lcc/cpp/include.c	2006-01-15 19:15:33 UTC (rev 487)
+++ trunk/code/tools/lcc/cpp/include.c	2006-01-15 21:17:03 UTC (rev 488)
@@ -10,11 +10,16 @@
 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 @@
 	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;
 		}
 	}




More information about the quake3-commits mailing list