OSDN Git Service

[Refactor] #37353 ソースファイル改名。
[hengband/hengband.git] / src / readdib.c
index 4051d94..b3a493d 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * @file readbits.c
+ * @file readdib.c
  * @brief Windows用ビットマップファイル読み込み処理パッケージ /
  * This package provides a routine to read a DIB file and set up the device dependent version of the image.
  * @date 2014/08/08
@@ -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)