Skip to content

Commit 95af9eb

Browse files
committed
PluginRAS: Fixed loading 1 channel images
1 parent d7a6ab7 commit 95af9eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/Plugins/PluginRAS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
309309
// Read SUN raster colormap
310310

311311
int numcolors = 1 << header.depth;
312-
if ((uint32_t)(3 * numcolors) > header.maplength) {
312+
if ((uint32_t)(3 * numcolors) >= header.maplength) {
313313
// some RAS may have less colors than the full palette
314314
numcolors = header.maplength / 3;
315315
} else {

0 commit comments

Comments
 (0)