mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Change all CColorConverter functions to work with u32 instead of s32 for sizes.
Nothing good could come out of putting negative values into any of those functions. And they are used a lot in image loaders which often can be tricked into passing large enough values to make those functions be called with negative numbers. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6389 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -62,7 +62,7 @@ bool CImageWriterBMP::writeImage(io::IWriteFile* file, IImage* image, u32 param)
|
||||
imageHeader.FileSize = imageHeader.BitmapDataOffset + imageHeader.BitmapDataSize;
|
||||
|
||||
// bitmaps are stored upside down and padded so we always do this
|
||||
void (*CColorConverter_convertFORMATtoFORMAT)(const void*, s32, void*) = 0;
|
||||
void (*CColorConverter_convertFORMATtoFORMAT)(const void*, u32, void*) = 0;
|
||||
switch(image->getColorFormat())
|
||||
{
|
||||
case ECF_R8G8B8:
|
||||
|
Reference in New Issue
Block a user