diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:20:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:20:19 +0300 |
commit | f0b7627b7d88c1d5bb484961377114b210c8dd53 (patch) | |
tree | a978c3b8eca88759fa71b5fc34112f4bea9bbcec /src/resources/db | |
parent | d9be27bba8941260500066cdd43ebb016356bc67 (diff) | |
download | manaverse-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.gz manaverse-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.bz2 manaverse-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.xz manaverse-f0b7627b7d88c1d5bb484961377114b210c8dd53.zip |
Fix code style.
Diffstat (limited to 'src/resources/db')
-rw-r--r-- | src/resources/db/palettedb.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index 8ec238336..08c8ec85d 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -82,13 +82,14 @@ void PaletteDB::loadPalette() if (line.empty() || line[0] == '#') continue; - unsigned int r; - unsigned int g; - unsigned int b; + 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); } } |