mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
sscanf format parameter fixups
git-svn-id: https://svn.eduke32.com/eduke32@7083 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9e68009725
commit
4bb9a4b792
6 changed files with 10 additions and 8 deletions
|
@ -188,7 +188,7 @@ static void decodeSoundSectMono(XASector *ssct, xa_data * xad)
|
|||
}
|
||||
|
||||
if (count > xad->blocksize)
|
||||
xad->block = (int8_t *)realloc(xad->block, count);
|
||||
xad->block = (int8_t *)Xrealloc(xad->block, count);
|
||||
|
||||
memcpy(xad->block, decodeBuf, count);
|
||||
xad->blocksize = count;
|
||||
|
@ -268,7 +268,7 @@ static void decodeSoundSectStereo(XASector *ssct, xa_data * xad)
|
|||
}
|
||||
|
||||
if (count > xad->blocksize)
|
||||
xad->block = (int8_t *)realloc(xad->block, count);
|
||||
xad->block = (int8_t *)Xrealloc(xad->block, count);
|
||||
|
||||
memcpy(xad->block, decodeBuf, count);
|
||||
xad->blocksize = count;
|
||||
|
@ -448,7 +448,7 @@ int32_t MV_PlayXA
|
|||
return MV_Error;
|
||||
}
|
||||
|
||||
xad = (xa_data *) calloc( 1, sizeof(xa_data) );
|
||||
xad = (xa_data *) Xcalloc( 1, sizeof(xa_data) );
|
||||
if (!xad) {
|
||||
MV_SetErrorCode( MV_InvalidFile );
|
||||
return MV_Error;
|
||||
|
|
|
@ -255,7 +255,9 @@ int32_t loadsetup(const char *fn)
|
|||
|
||||
if (readconfig(fp, "remap", val, VL) > 0)
|
||||
{
|
||||
char *p=val; int32_t v1,v2;
|
||||
char *p=val;
|
||||
uint32_t v1,v2;
|
||||
|
||||
while (*p)
|
||||
{
|
||||
if (!sscanf(p,"%x",&v1))break;
|
||||
|
|
|
@ -379,7 +379,7 @@ int32_t scriptfile_getsymbolvalue(char const *name, int32_t *val)
|
|||
{
|
||||
if (name[0] == '0' && tolower(name[1]) == 'x') // hex constants
|
||||
{
|
||||
int64_t x;
|
||||
uint64_t x;
|
||||
sscanf(name + 2, "%" PRIx64 "", &x);
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(x > UINT32_MAX))
|
||||
|
|
|
@ -140,7 +140,7 @@ static void G_AddDemo(const char* param)
|
|||
// -d<filename>:<num>[,<num>]
|
||||
// profiling options
|
||||
*(colon++) = 0;
|
||||
Bsscanf(colon, "%u,%u", &framespertic, &numrepeats);
|
||||
Bsscanf(colon, "%d,%d", &framespertic, &numrepeats);
|
||||
}
|
||||
|
||||
Demo_SetFirst(tempbuf);
|
||||
|
|
|
@ -1793,7 +1793,7 @@ static int32_t parse_decimal_number(void) // (textptr)
|
|||
|
||||
static int32_t parse_hex_constant(const char *hexnum)
|
||||
{
|
||||
int64_t x;
|
||||
uint64_t x;
|
||||
sscanf(hexnum, "%" PRIx64 "", &x);
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(x > UINT32_MAX))
|
||||
|
|
|
@ -958,7 +958,7 @@ static int32_t GetGamearrayID(const char *szGameLabel, int32_t searchlocals)
|
|||
static int32_t parse_integer_literal(int32_t *num)
|
||||
{
|
||||
if (textptr[0] == '0' && tolower(textptr[1])=='x')
|
||||
sscanf(textptr+2, "%" SCNx32, num);
|
||||
sscanf(textptr+2, "%" SCNx32, (uint32_t *)&num);
|
||||
else
|
||||
{
|
||||
long lnum;
|
||||
|
|
Loading…
Reference in a new issue