mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
Don't try to add a slash to actual filenames, only paths...
This commit is contained in:
parent
645bd212d7
commit
7f915c0f2a
1 changed files with 1 additions and 7 deletions
8
ftepp.c
8
ftepp.c
|
@ -994,12 +994,6 @@ static char *ftepp_include_find_path(const char *file, const char *pathfile)
|
||||||
memcpy(vec_add(filename, len), pathfile, len);
|
memcpy(vec_add(filename, len), pathfile, len);
|
||||||
vec_push(filename, '/');
|
vec_push(filename, '/');
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
len = strlen(pathfile);
|
|
||||||
memcpy(vec_add(filename, len), pathfile, len);
|
|
||||||
if (vec_last(filename) != '/')
|
|
||||||
vec_push(filename, '/');
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlen(file);
|
len = strlen(file);
|
||||||
memcpy(vec_add(filename, len+1), file, len);
|
memcpy(vec_add(filename, len+1), file, len);
|
||||||
|
@ -1062,7 +1056,7 @@ static bool ftepp_include(ftepp_t *ftepp)
|
||||||
}
|
}
|
||||||
inlex = lex_open(filename);
|
inlex = lex_open(filename);
|
||||||
if (!inlex) {
|
if (!inlex) {
|
||||||
ftepp_error(ftepp, "failed to open include file `%s`", filename);
|
ftepp_error(ftepp, "open failed on include file `%s`", filename);
|
||||||
vec_free(filename);
|
vec_free(filename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue