Quiet/fix a couple of static analyzer warnings as reported by Xcode.

This commit is contained in:
C.W. Betts 2024-05-09 21:02:44 -06:00
parent f793797088
commit 3bb0caafc4
2 changed files with 2 additions and 2 deletions

View File

@ -661,7 +661,7 @@ void bm_ChangeEndName(const char *src, char *dest) {
ddio_SplitPath(src, path, filename, ext);
limit = BITMAP_NAME_LEN - 7;
// Make sure we don't go over our name length limit
strncpy(filename, filename, limit);
// strncpy(filename, filename, limit);
filename[limit] = 0;
Start:
if (curnum != -1)

View File

@ -262,7 +262,7 @@ void ddio_MakePath(char *newPath, const char *absolutePathHeader, const char *su
// Add the first sub directory
pathLength = strlen(newPath);
if (newPath[pathLength - 1] != delimiter) {
if (pathLength > 0 && newPath[pathLength - 1] != delimiter) {
newPath[pathLength] = delimiter; // add the delimiter
newPath[pathLength + 1] = 0; // terminate the string
}