mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-24 04:03:39 -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')))
|
if (ic < 4 && (*p == '#' || (p[0] == '0' && p[1] == 'x')))
|
||||||
col[ic++] = strtol(p+1+(*p=='0'), (char**)&p, 16);
|
col[ic++] = strtol(p+1+(*p=='0'), (char**)&p, 16);
|
||||||
else if (ic < 4 && *p >= '0' && *p <= '9')
|
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')
|
if (*p == '\n')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user