OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / readdib.c
index eb7cabc..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
@@ -203,7 +203,7 @@ static BOOL NEAR PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
  * loads the DIB.  Once the DIB is loaded, the function also creates a bitmap
  * and palette out of the DIB for a device-dependent form.
  * device-dependent representation of the image.
- * @param hwnd ウィンドウハンドル
+ * @param hWnd ウィンドウハンドル
  * @param lpFileName 読み込むビットマップファイル
  * @param pInfo 取得情報を補完するビットマップ情報構造体ポインタ
  * @return
@@ -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)