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

+1 -1
View File
@@ -672,7 +672,7 @@ std::string GetScheduledEventsSummary() {
if (!name)
name = "[unknown]";
char temp[512];
sprintf(temp, "%s : %i %08x%08x\n", name, (int)ptr->time, (u32)(ptr->userdata >> 32), (u32)(ptr->userdata));
snprintf(temp, sizeof(temp), "%s : %i %08x%08x\n", name, (int)ptr->time, (u32)(ptr->userdata >> 32), (u32)(ptr->userdata));
text += temp;
ptr = ptr->next;
}