diff --git a/bitmap/bitmain.cpp b/bitmap/bitmain.cpp index 5ad52828..a1c6d873 100644 --- a/bitmap/bitmain.cpp +++ b/bitmap/bitmain.cpp @@ -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) diff --git a/ddio_lnx/lnxfile.cpp b/ddio_lnx/lnxfile.cpp index eeda8b5c..83f66ea6 100644 --- a/ddio_lnx/lnxfile.cpp +++ b/ddio_lnx/lnxfile.cpp @@ -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 }