Eradicate calls to deprecated sprintf()

This commit is contained in:
Erica Fischer
2023-07-06 12:57:38 -07:00
parent 350d79399f
commit 1c2c07c596
7 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ std::string check_utf8(std::string s) {
out += " ";
}
char tmp[6];
sprintf(tmp, "0x%02X", s[i + j] & 0xFF);
snprintf(tmp, sizeof(tmp), "0x%02X", s[i + j] & 0xFF);
out += std::string(tmp);
}
out += ")";