1
0

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

@@ -55,10 +55,10 @@ bool CImageWriterTGA::writeImage(io::IWriteFile *file, IImage *image,u32 param)
// be fixed to only swap/flip
imageHeader.ImageDescriptor = (1 << 5);
// chances are good we'll need to swizzle data, so i'm going
// chances are good we'll need to swizzle data, so I'm going
// to convert and write one scan line at a time. it's also
// a bit cleaner this way
void (*CColorConverter_convertFORMATtoFORMAT)(const void*, s32, void*) = 0;
void (*CColorConverter_convertFORMATtoFORMAT)(const void*, u32, void*) = 0;
switch(image->getColorFormat())
{
case ECF_A8R8G8B8: