mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Fix error when decoding GPL file
Color without name are not added to the palette.
This commit is contained in:
parent
b0f53324a7
commit
ea06140be8
@ -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…
x
Reference in New Issue
Block a user