mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-22 11:04:57 -04:00
Fix decimal parser skipping first digit
This commit is contained in:
parent
9bdc83b6ed
commit
d81832c670
2
util.c
2
util.c
@ -354,7 +354,7 @@ int parseBiomeColors(unsigned char biomeColors[256][3], const char *buf)
|
||||
if (ic < 4 && (*p == '#' || (p[0] == '0' && p[1] == 'x')))
|
||||
col[ic++] = strtol(p+1+(*p=='0'), (char**)&p, 16);
|
||||
else if (ic < 4 && *p >= '0' && *p <= '9')
|
||||
col[ic++] = strtol(p+1, (char**)&p, 10);
|
||||
col[ic++] = strtol(p, (char**)&p, 10);
|
||||
if (*p == '\n')
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user