fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Convert sprintf to snprintf part 1

Open JohnAFernandez opened this issue 2 years ago • 1 comments

This partially addresses a very common warning from clang when compiling FSO that sprintf is deprecated and needs to be converted to snprintf. Now, I don't think the security issues are a huge deal for us, but on the compilation output, it will print out multiple lines for each occurrence, and we use sprintf upwards of 800 times.

This pr converts about a third of them. Note that the SCP_string overload of sprintf is not affected.

In draft until I can do some basic smoke testing. The changes were not complicated, but they are extensive.

JohnAFernandez avatar Oct 22 '23 16:10 JohnAFernandez

I did not see any odd text behavior when I tested this patch.

JohnAFernandez avatar Dec 11 '23 23:12 JohnAFernandez