Fix -Werror=stringop-truncation build failure in fileutils.c

This commit is contained in:
achazal
2026-06-02 16:41:43 +02:00
parent ea142febde
commit c29afcbe8c
+1 -3
View File
@@ -3036,9 +3036,7 @@ static int filelist(const char *path, const char *ext, uint8_t last, bool tentat
for (int i = 0; i < n; i++) {
char tmp_fullpath[1024] = {0};
strncat(tmp_fullpath, path, sizeof(tmp_fullpath) - 1);
tmp_fullpath[1023] = 0x00;
strncat(tmp_fullpath, namelist[i]->d_name, strlen(tmp_fullpath) - 1);
snprintf(tmp_fullpath, sizeof(tmp_fullpath), "%s%s", path, namelist[i]->d_name);
if (path_is_directory(tmp_fullpath)) {