Fixed buffer overflow issue in DXTCImage, added nicer error messages.
This commit is contained in:
@ -209,7 +209,8 @@ bool CGraphicImageTexture::CreateFromMemoryFile(UINT bufSize, const void * c_pvB
|
||||
|
||||
static CDXTCImage image;
|
||||
|
||||
if (image.LoadHeaderFromMemory((const BYTE *) c_pvBuf)) // DDS<44>ΰ<EFBFBD> Ȯ<><C8AE>
|
||||
// Check whether the file is a DDS
|
||||
if (image.LoadHeaderFromMemory((const BYTE *) c_pvBuf, bufSize))
|
||||
{
|
||||
return (CreateDDSTexture(image, (const BYTE *) c_pvBuf));
|
||||
}
|
||||
|
Reference in New Issue
Block a user