Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy

This commit is contained in:
Henrik Rydgård committed 2023-04-28 21:04:05 +02:00
1 parent c02634c161
commit 6945deec01
39 files changed
+170 -193

No files matched your search

+2 -2
View File
@@ -242,7 +242,7 @@ std::string StringFromFormat(const char* format, ...)
std::string StringFromInt(int value)
{
char temp[16];
sprintf(temp, "%i", value);
snprintf(temp, sizeof(temp), "%d", value);
return temp;
}
@@ -367,4 +367,4 @@ std::string UnescapeMenuString(const char *input, char *shortcutChar) {
}
}
return output;
}
}