mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Fix two bugs in SCRIPT_GetNumber that cause it to issue an incorrect return value.
git-svn-id: https://svn.eduke32.com/eduke32@5469 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
00bc250811
commit
a5367ed600
1 changed files with 2 additions and 2 deletions
|
@ -724,13 +724,13 @@ int32_t SCRIPT_GetNumber(int32_t scripthandle, const char * sectionname, const c
|
|||
{
|
||||
// hex
|
||||
*number = strtol(e->value+2, &p, 16);
|
||||
if (p == e->value || *p != 0 || *p != ' ' || *p != '\t') return 1;
|
||||
if (p == e->value+2 || (*p != 0 && *p != ' ' && *p != '\t')) return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// decimal
|
||||
*number = strtol(e->value, &p, 10);
|
||||
if (p == e->value || *p != 0 || *p != ' ' || *p != '\t') return 1;
|
||||
if (p == e->value || (*p != 0 && *p != ' ' && *p != '\t')) return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue