mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-21 21:35:38 +00:00
dep/simpleini: Replace sprintf() with snprintf()
This commit is contained in:
parent
709e107db7
commit
e097f720bb
|
@ -2073,11 +2073,7 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SetLongValue(
|
|||
|
||||
// convert to an ASCII string
|
||||
char szInput[64];
|
||||
#if __STDC_WANT_SECURE_LIB__ && !_WIN32_WCE
|
||||
sprintf_s(szInput, a_bUseHex ? "0x%lx" : "%ld", a_nValue);
|
||||
#else // !__STDC_WANT_SECURE_LIB__
|
||||
sprintf(szInput, a_bUseHex ? "0x%lx" : "%ld", a_nValue);
|
||||
#endif // __STDC_WANT_SECURE_LIB__
|
||||
snprintf(szInput, sizeof(szInput), a_bUseHex ? "0x%lx" : "%ld", a_nValue);
|
||||
|
||||
// convert to output text
|
||||
SI_CHAR szOutput[64];
|
||||
|
@ -2135,11 +2131,7 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SetDoubleValue(
|
|||
|
||||
// convert to an ASCII string
|
||||
char szInput[64];
|
||||
#if __STDC_WANT_SECURE_LIB__ && !_WIN32_WCE
|
||||
sprintf_s(szInput, "%f", a_nValue);
|
||||
#else // !__STDC_WANT_SECURE_LIB__
|
||||
sprintf(szInput, "%f", a_nValue);
|
||||
#endif // __STDC_WANT_SECURE_LIB__
|
||||
snprintf(szInput, sizeof(szInput), "%f", a_nValue);
|
||||
|
||||
// convert to output text
|
||||
SI_CHAR szOutput[64];
|
||||
|
|
Loading…
Reference in a new issue