OSDN Git Service

[Refactor] #37353 ソースファイル改名。
[hengband/hengband.git] / src / readdib.c
index aacf4f1..b3a493d 100644 (file)
@@ -273,7 +273,8 @@ BOOL ReadDIB(HWND hWnd, LPSTR lpFileName, DIBINIT *pInfo)
                        goto ErrExit;
        }
 
-       if (!(nNumColors == (WORD)lpbi->biClrUsed))
+       nNumColors = (WORD)lpbi->biClrUsed;
+       if (!nNumColors)
        {
                /* no color table for 24-bit, default size otherwise */
                if (lpbi->biBitCount != 24)