Browse Source

Corrected issues on LoadPKM()

pull/1262/head
raysan5 4 years ago
parent
commit
795c079c55
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/textures.c

+ 2
- 2
src/textures.c View File

@ -3522,7 +3522,7 @@ static Image LoadPKM(const char *fileName)
int dataSize = image.width*image.height*bpp/8; // Total data size in bytes
image.data = (unsigned char *)RL_MALLOC(size*sizeof(unsigned char));
image.data = (unsigned char *)RL_MALLOC(dataSize*sizeof(unsigned char));
memcpy(image.data, fileDataPtr, dataSize);
@ -3831,7 +3831,7 @@ static Image LoadPVR(const char *fileName)
else if (pvrHeader->channels[0] == 2) image.format = COMPRESSED_PVRT_RGB;
else if (pvrHeader->channels[0] == 3) image.format = COMPRESSED_PVRT_RGBA;
fileDataPtr += pvrHeader->metaDataSize); // Skip meta data header
fileDataPtr += pvrHeader->metaDataSize; // Skip meta data header
// Calculate data size (depends on format)
int bpp = 0;

Loading…
Cancel
Save