Skip to content
Browse files
Add workaround for color.txt parsing on MinGW
  • Loading branch information
sfan5 committed Dec 20, 2014
1 parent 20b340e commit 722f02d121d46cd60282d317d563d2652e8de2c8
Showing 1 changed file with 9 additions and 0 deletions.
@@ -264,11 +264,20 @@ void TileGenerator::parseColorsStream(std::istream &in)

char name[75];
#ifdef __MINGW32__
// MinGW's sscanf doesn't support %hhu
unsigned int r, g, b, a, t;
uint8_t r, g, b, a, t;
a = 255;
t = 0;

#ifdef __MINGW32__
sscanf(line, "%75s %u %u %u %u %u", name, &r, &g, &b, &a, &t);
sscanf(line, "%75s %hhu %hhu %hhu %hhu %hhu", name, &r, &g, &b, &a, &t);
if(strlen(name) == 0)
ColorEntry color = ColorEntry(r, g, b, a, t);

0 comments on commit 722f02d

Please sign in to comment.