Separate error on missing file extension
This commit is contained in:
parent
7c79950a95
commit
e1dea0a81a
|
|
@ -503,11 +503,16 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
|||
Image image = { 0 };
|
||||
|
||||
// Security check for input data
|
||||
if ((fileType == NULL) || (fileData == NULL) || (dataSize == 0))
|
||||
if ((fileData == NULL) || (dataSize == 0))
|
||||
{
|
||||
TRACELOG(LOG_ERROR, "IMAGE: Invalid file data");
|
||||
return image;
|
||||
}
|
||||
if (fileType == NULL)
|
||||
{
|
||||
TRACELOG(LOG_ERROR, "IMAGE: Missing file extension");
|
||||
return image;
|
||||
}
|
||||
|
||||
if ((false)
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user