Separate error on missing file extension

This commit is contained in:
Jutastre 2024-07-24 19:22:29 +02:00
parent 7c79950a95
commit e1dea0a81a

View File

@ -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)