diff --git a/ArcFormats/Eushully/ImageGP.cs b/ArcFormats/Eushully/ImageGP.cs index ab7e1ece..c7b26596 100644 --- a/ArcFormats/Eushully/ImageGP.cs +++ b/ArcFormats/Eushully/ImageGP.cs @@ -62,7 +62,7 @@ namespace GameRes.Formats.Eushully int bpp = stream.ReadByte(); if (alpha_channel < 0 || alpha_channel > 1 || method < 0 || method > 2 || align1 < 0 || align1 > 4 || align2 < 0 || align2 > 4 - || bpp <= 0 || !(bpp <= 16 || 24 == bpp || 32 == bpp)) + || bpp < 0 || !(bpp <= 16 || 24 == bpp || 32 == bpp)) return null; int palette_size = stream.ReadInt32(); @@ -70,13 +70,13 @@ namespace GameRes.Formats.Eushully uint height = stream.ReadUInt16(); if (palette_size <= 0 || 0 == width || 0 == height || palette_size >= stream.Length) return null; - if (bpp <= 8 && palette_size > 0x100) + if (bpp > 0 && bpp <= 8 && palette_size > 0x100) return null; return new GpMetaData { Width = width, Height = height, - BPP = bpp, + BPP = bpp == 0 ? 24 : bpp, HasAlpha = alpha_channel != 0, Method = method, ElementSize = align1, diff --git a/LICENSE b/LICENSE index 044550db..49276136 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2019 morkt +Copyright (c) 2014-2020 morkt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal