mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Quiet/fix a couple of static analyzer warnings as reported by Xcode.
This commit is contained in:
parent
f793797088
commit
3bb0caafc4
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user