mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier1: fix type demotion warning
Promote type to signed size type.
This commit is contained in:
parent
eae0d0964b
commit
a2ceab52da
@ -25,7 +25,7 @@
|
||||
#define FmtStrVSNPrintf( szBuf, nBufSize, bQuietTruncation, ppszFormat, nPrevLen, lastArg ) \
|
||||
do \
|
||||
{ \
|
||||
int result; \
|
||||
ssize_t result; \
|
||||
va_list arg_ptr; \
|
||||
bool bTruncated = false; \
|
||||
static int scAsserted = 0; \
|
||||
|
@ -81,7 +81,7 @@ inline bool V_iswdigit(int c)
|
||||
}
|
||||
|
||||
void V_binarytohex(const byte* in, size_t inputbytes, char* out, size_t outsize);
|
||||
int V_vsnprintfRet(char* pDest, int maxLen, const char* pFormat, va_list params, bool* pbTruncated);
|
||||
ssize_t V_vsnprintfRet(char* pDest, size_t maxLen, const char* pFormat, va_list params, bool* pbTruncated);
|
||||
|
||||
// Strip white space at the beginning and end of a string
|
||||
ssize_t V_StrTrim(char* pStr);
|
||||
|
@ -266,12 +266,12 @@ void V_binarytohex(const byte* in, size_t inputbytes, char* out, size_t outsize)
|
||||
}
|
||||
|
||||
|
||||
int V_vsnprintfRet(char* pDest, int maxLen, const char* pFormat, va_list params, bool* pbTruncated)
|
||||
ssize_t V_vsnprintfRet(char* pDest, size_t maxLen, const char* pFormat, va_list params, bool* pbTruncated)
|
||||
{
|
||||
Assert(maxLen > 0);
|
||||
|
||||
int len = _vsnprintf(pDest, maxLen, pFormat, params);
|
||||
bool bTruncated = (len < 0) || (len >= maxLen);
|
||||
ssize_t len = _vsnprintf(pDest, maxLen, pFormat, params);
|
||||
const bool bTruncated = (len < 0) || (len >= (ssize_t)maxLen);
|
||||
|
||||
if (pbTruncated)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user