mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by
yesterday's additions. Changed it so that the parser first checks for the presence of a '-' sign before deciding whether to use strtol or strtoul to convert the string into a number. SVN r1831 (trunk)
This commit is contained in:
parent
1c57ac3138
commit
3a6d66e230
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
September 15, 2009 (Changes by Graf Zahl)
|
||||
- fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by
|
||||
yesterday's additions. Changed it so that the parser first checks for
|
||||
the presence of a '-' sign before deciding whether to use strtol or
|
||||
strtoul to convert the string into a number.
|
||||
|
||||
September 14, 2009 (Changes by Graf Zahl)
|
||||
- Added PinkSilver's A_LookEx fix.
|
||||
- added resources needed for MBF support.
|
||||
|
|
|
@ -958,7 +958,11 @@ static int PatchThing (int thingy)
|
|||
{
|
||||
if (IsNum (strval))
|
||||
{
|
||||
value[0] |= (unsigned long)strtol(strval, NULL, 10);
|
||||
// I have no idea why everyone insists on using strtol here even though it fails
|
||||
// dismally if a value is parsed where the highest bit it set. Do people really
|
||||
// use negative values here? Let's better be safe and check both.
|
||||
if (strchr(strval, '-')) value[0] |= (unsigned long)strtol(strval, NULL, 10);
|
||||
else value[0] |= (unsigned long)strtoul(strval, NULL, 10);
|
||||
vchanged[0] = true;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue