mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 04:29:34 -04:00
check for negative value in ptr_lstrip() (#988)
* check for negative value in ptr_lstrip() This fixes parsing of DEHACKED in D2ISOv2.wad with debug version of CRT. If the value < 0 the behavior of `isspace()` is undefined according to the documentation. * disable vcpkg update
This commit is contained in:
parent
7ad722e845
commit
3f4ba9f388
@ -3137,7 +3137,7 @@ void rstrip(char *s) // strip trailing whitespace
|
|||||||
//
|
//
|
||||||
char *ptr_lstrip(char *p) // point past leading whitespace
|
char *ptr_lstrip(char *p) // point past leading whitespace
|
||||||
{
|
{
|
||||||
while (isspace(*p))
|
while (*p >= 0 && isspace(*p))
|
||||||
p++;
|
p++;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user