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:
cutealien
2022-05-08 15:40:38 +00:00
parent f64732cd7e
commit 10f0e39e46
6 changed files with 123 additions and 123 deletions

View File

@ -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: