From d81832c67098f861406abe55f7459d87ac5f88b7 Mon Sep 17 00:00:00 2001 From: Cubitect Date: Wed, 8 Dec 2021 20:02:42 +0100 Subject: [PATCH] Fix decimal parser skipping first digit --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 8c77823..e327664 100644 --- a/util.c +++ b/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; }