For C99 only, replaced sprintf with safer snprintf
Fixes compiler warnings on macOS and OpenBSD, which warn about sprintf as it's prone to buffer overruns.
Fixes compiler warnings on macOS and OpenBSD, which warn about sprintf as it's prone to buffer overruns.