d3dx9: Add a WARN to get_image_info_from_dds about too short DDS files.
This commit is contained in:
parent
d313e4f9d3
commit
3a94473802
|
@ -372,7 +372,10 @@ static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAG
|
|||
expected_length *= faces;
|
||||
expected_length += sizeof(*header);
|
||||
if (length < expected_length)
|
||||
{
|
||||
WARN("File is too short %u, expected at least %u bytes\n", length, expected_length);
|
||||
return D3DXERR_INVALIDDATA;
|
||||
}
|
||||
|
||||
info->ImageFileFormat = D3DXIFF_DDS;
|
||||
|
||||
|
|
Loading…
Reference in New Issue