mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Update to previous patch (remove the strcpy.)
This commit is contained in:
parent
da3a763e97
commit
583c3b4746
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. */
|
||||
strncpy(temp, path, sizeof(temp)-1);
|
||||
|
||||
/* Try this for several "levels" up. */
|
||||
for (c = 0; c < 4; c++) {
|
||||
p = tcc_basename(temp);
|
||||
if (p > temp) {
|
||||
@ -136,7 +137,6 @@ static inline char *config_tccdir_w32(char *path)
|
||||
if (_access(try, 0) == 0) {
|
||||
if (p != NULL)
|
||||
p = '\0';
|
||||
path = tcc_malloc(strlen(temp)+1);
|
||||
strcpy(path, temp);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user