xNWP/xTGA

Exception levée SampleTga.exe 

ToutEnMasm opened this issue · 1 comments

it's about the c sample opening a tga.The tga file is loaded and there is an exception at line:
xtga_ManagedArray* Image = xtga_TGAFile_GetImageRGBA(MyFile, &AlphaType, &err);
Visual studio 2019 say bug is in dll: codecs.cpp line 2261:

if (!obuffer)
{
obuffer = (uchar*)malloc((addressable)w * h * depth);
for (addressable i = 0; i < (addressable)w * h * depth; ++i)
{
((uchar*)obuffer)[i] = ((uchar*)buffer)[i]; //<<<<<<<<<< here
}
}
I join the sample

sample.zip

xNWP commented

Hi there! Sorry for the late reply, the problem has been fixed with 0663ec5 , I will be creating a release in a few minutes as well :-)

Thanks for reporting the problem and attaching a project to make it easy to test.