mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 07:44:43 +01:00
Fix compiler warning
This commit is contained in:
parent
41ede7ce4d
commit
b0988dfc87
@ -594,7 +594,7 @@ static STREAMFILE *open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(buf, mus_name, PATH_LIMIT);
|
strncpy(buf, mus_name, PATH_LIMIT - 1);
|
||||||
pch = strtok(buf, ","); //TODO: not thread safe in std C
|
pch = strtok(buf, ","); //TODO: not thread safe in std C
|
||||||
for (j = 0; j < track && pch; j++) {
|
for (j = 0; j < track && pch; j++) {
|
||||||
pch = strtok(NULL, ",");
|
pch = strtok(NULL, ",");
|
||||||
@ -603,9 +603,9 @@ static STREAMFILE *open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
|
|||||||
|
|
||||||
if (use_mask) {
|
if (use_mask) {
|
||||||
file_name[file_len - map_len] = '\0';
|
file_name[file_len - map_len] = '\0';
|
||||||
strncat(file_name, pch + 1, PATH_LIMIT);
|
strncat(file_name, pch + 1, PATH_LIMIT - 1);
|
||||||
} else {
|
} else {
|
||||||
strncpy(file_name, pch, PATH_LIMIT);
|
strncpy(file_name, pch, PATH_LIMIT - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
musFile = open_streamfile_by_filename(streamFile, file_name);
|
musFile = open_streamfile_by_filename(streamFile, file_name);
|
||||||
|
@ -690,7 +690,7 @@ static STREAMFILE* open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(buf, mus_name, PATH_LIMIT);
|
strncpy(buf, mus_name, PATH_LIMIT - 1);
|
||||||
pch = strtok(buf, ","); //TODO: not thread safe in std C
|
pch = strtok(buf, ","); //TODO: not thread safe in std C
|
||||||
for (j = 0; j < track && pch; j++) {
|
for (j = 0; j < track && pch; j++) {
|
||||||
pch = strtok(NULL, ",");
|
pch = strtok(NULL, ",");
|
||||||
@ -699,9 +699,9 @@ static STREAMFILE* open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
|
|||||||
|
|
||||||
if (use_mask) {
|
if (use_mask) {
|
||||||
file_name[file_len - map_len] = '\0';
|
file_name[file_len - map_len] = '\0';
|
||||||
strncat(file_name, pch + 1, PATH_LIMIT);
|
strncat(file_name, pch + 1, PATH_LIMIT - 1);
|
||||||
} else {
|
} else {
|
||||||
strncpy(file_name, pch, PATH_LIMIT);
|
strncpy(file_name, pch, PATH_LIMIT - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
musFile = open_streamfile_by_filename(streamFile, file_name);
|
musFile = open_streamfile_by_filename(streamFile, file_name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user