mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-17 07:10:36 +00:00
Merge pull request #1062 from RomainGiraud/master
Fix error when decoding GPL file
This commit is contained in:
commit
7d24d7cc82
@ -53,8 +53,11 @@ Palette* load_gpl_file(const char *filename)
|
||||
std::istringstream lineIn(line);
|
||||
// TODO add support to read the color name
|
||||
lineIn >> r >> g >> b;
|
||||
if (lineIn.good())
|
||||
pal->addEntry(rgba(r, g, b, 255));
|
||||
|
||||
if (lineIn.fail())
|
||||
continue;
|
||||
|
||||
pal->addEntry(rgba(r, g, b, 255));
|
||||
}
|
||||
|
||||
return pal.release();
|
||||
|
Loading…
Reference in New Issue
Block a user