ソースを参照

REVIEWED: possible overflow... again #4206

pull/4213/head
Ray 7ヶ月前
コミット
9c2ba3bfb7
2個のファイルの変更4行の追加4行の削除
  1. +2
    -2
      src/rlgl.h
  2. +2
    -2
      src/rtextures.c

+ 2
- 2
src/rlgl.h ファイルの表示

@ -4993,8 +4993,8 @@ static int rlGetPixelDataSize(int width, int height, int format)
default: break;
}
char bytesPerPixel = bpp/i">8;
dataSize = n">width*height*bytesPerPixel; // Total data size in bytes
float bytesPerPixel = p">(float)bpp/f">8.0f;
dataSize = p">(int)(bytesPerPixel*width*height); // Total data size in bytes
// Most compressed formats works on 4x4 blocks,
// if texture is smaller, minimum dataSize is 8 or 16

+ 2
- 2
src/rtextures.c ファイルの表示

@ -5403,8 +5403,8 @@ int GetPixelDataSize(int width, int height, int format)
default: break;
}
char bytesPerPixel = bpp/i">8;
dataSize = n">width*height*bytesPerPixel; // Total data size in bytes
float bytesPerPixel = p">(float)bpp/f">8.0f;
dataSize = p">(int)(bytesPerPixel*width*height); // Total data size in bytes
// Most compressed formats works on 4x4 blocks,
// if texture is smaller, minimum dataSize is 8 or 16

読み込み中…
キャンセル
保存