Update to previous patch (remove the strcpy.)
This commit is contained in:
parent
da3a763e97
commit
583c3b4746
1 changed files with 1 additions and 1 deletions
2
libtcc.c
2
libtcc.c
|
@ -123,6 +123,7 @@ static inline char *config_tccdir_w32(char *path)
|
||||||
/* No 'include' folder found, so go up one level. */
|
/* No 'include' folder found, so go up one level. */
|
||||||
strncpy(temp, path, sizeof(temp)-1);
|
strncpy(temp, path, sizeof(temp)-1);
|
||||||
|
|
||||||
|
/* Try this for several "levels" up. */
|
||||||
for (c = 0; c < 4; c++) {
|
for (c = 0; c < 4; c++) {
|
||||||
p = tcc_basename(temp);
|
p = tcc_basename(temp);
|
||||||
if (p > temp) {
|
if (p > temp) {
|
||||||
|
@ -136,7 +137,6 @@ static inline char *config_tccdir_w32(char *path)
|
||||||
if (_access(try, 0) == 0) {
|
if (_access(try, 0) == 0) {
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
p = '\0';
|
p = '\0';
|
||||||
path = tcc_malloc(strlen(temp)+1);
|
|
||||||
strcpy(path, temp);
|
strcpy(path, temp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue