Skip to content

Commit

Permalink
Fix #710
Browse files Browse the repository at this point in the history
  • Loading branch information
crudelios committed Dec 20, 2023
1 parent 082866c commit b990d62
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ static const char *get_case_corrected_file(const char *dir, const char *filepath
return 0;
}

strncpy(&corrected_filename[dir_len], filepath, 2 * FILE_NAME_MAX - dir_len - 1);

char *slash = strchr(&corrected_filename[dir_len], '/');
if (!slash) {
slash = strchr(&corrected_filename[dir_len], '\\');
Expand All @@ -150,7 +148,7 @@ static const char *get_case_corrected_file(const char *dir, const char *filepath
}
}
} else {
if (correct_case(dir, corrected_filename, TYPE_FILE)) {
if (correct_case(dir, &corrected_filename[dir_len], TYPE_FILE)) {
return corrected_filename;
}
}
Expand Down

0 comments on commit b990d62

Please sign in to comment.