mirror of https://github.com/PCSX2/pcsx2.git
3rdparty/SimpleINI: Replace sprintf() with snprintf()
This commit is contained in:
parent
5690742937
commit
e8201b115f
|
@ -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 New Issue