From 81c2837569e9e11cbce137464b8574b8868893d8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 11 Apr 2016 17:57:36 +0300 Subject: Fix compilation warning with some flags. --- src/resources/db/palettedb.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/resources') diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index cc27fa292..88f90a1fc 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -82,23 +82,23 @@ void PaletteDB::loadPalette() if (line.empty() || line[0] == '#') continue; -#ifdef WIN32 - unsigned int r; - unsigned int g; - unsigned int b; +#ifdef ADVGCC + unsigned char r; + unsigned char g; + unsigned char b; - if (sscanf(line.c_str(), "%10u %10u %10u\t%100s", + if (sscanf(line.c_str(), "%10hhu %10hhu %10hhu\t%100s", &r, &g, &b, name) == 4) { name[100] = 0; mColors[name] = DyeColor(r, g, b); } #else - unsigned char r; - unsigned char g; - unsigned char b; + unsigned int r; + unsigned int g; + unsigned int b; - if (sscanf(line.c_str(), "%10hhu %10hhu %10hhu\t%100s", + if (sscanf(line.c_str(), "%10u %10u %10u\t%100s", &r, &g, &b, name) == 4) { name[100] = 0; -- cgit v1.2.3-70-g09d2