From a7422827c88f4b3c9704f62f04fdc58b69665972 Mon Sep 17 00:00:00 2001 From: "Rab H. Sonmai" Date: Sat, 15 Oct 2016 19:38:41 +0200 Subject: [PATCH] Fix sizeof(pointer) error in vita_audio.c Getting the sizeof a pointer is always the same value, either dereference the pointer or use its type to get the correct size. --- audio/vita_audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/vita_audio.c b/audio/vita_audio.c index 44a1c68..468bbf1 100644 --- a/audio/vita_audio.c +++ b/audio/vita_audio.c @@ -481,8 +481,8 @@ vitaWav *vitaWavLoad(const char *filename) lSize = sceIoLseek32(fd, 0, SCE_SEEK_END); sceIoLseek32(fd, 0, SCE_SEEK_SET); - wav = malloc(lSize + sizeof(wav)); - wavfile = (unsigned char*)(wav) + sizeof(wav); + wav = malloc(lSize + sizeof(vitaWav)); + wavfile = (unsigned char*)(wav) + sizeof(vitaWav); filelen = sceIoRead(fd, wavfile, lSize); @@ -508,4 +508,4 @@ void vitaWavUnload(vitaWav *wav) { if(wav != NULL) free(wav); -} \ No newline at end of file +}