From 91ba0765e6c65ae086fb97d3e9ac5292b9a8c93f Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 9 Apr 2018 05:58:32 +0200 Subject: [PATCH] (libchdr) Silnces xcode warning --- libretro-common/formats/libchdr/chd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libretro-common/formats/libchdr/chd.c b/libretro-common/formats/libchdr/chd.c index 78cac091bb..be359615a1 100644 --- a/libretro-common/formats/libchdr/chd.c +++ b/libretro-common/formats/libchdr/chd.c @@ -405,9 +405,10 @@ void *lzma_fast_alloc(void *p, size_t size) } /* alloc a new one and put it into the list */ - addr = (uint32_t *)malloc(sizeof(uint8_t) * (size + sizeof(uint32_t))); - if (addr==NULL) + addr = (uint32_t *)malloc(sizeof(uint32_t) * (size + sizeof(uint32_t))); + if (!addr) return NULL; + for (scan = 0; scan < MAX_LZMA_ALLOCS; scan++) { if (codec->allocptr[scan] == NULL)