Skip to content

Commit

Permalink
* Fix a bug where q3cpp's include paths were not set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Jan 15, 2006
1 parent 363c0d4 commit 9f427d8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/tools/lcc/cpp/include.c
Expand Up @@ -10,19 +10,24 @@ 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;
}
}

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;
}
}
Expand Down

0 comments on commit 9f427d8

Please sign in to comment.