From b850edc733d8aa3a628b3b108641d1068e6b67b9 Mon Sep 17 00:00:00 2001 From: manuel5975p Date: Wed, 12 Jul 2023 16:00:37 +0200 Subject: [PATCH] Update raygui.h (#301) Cast malloc to unsigned char* for C++ --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index d9d550f..0c5f767 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -4174,7 +4174,7 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) if ((recsDataCompressedSize > 0) && (recsDataCompressedSize != recsDataSize)) { // Recs data is compressed, uncompress it - unsigned char *recsDataCompressed = RAYGUI_MALLOC(recsDataCompressedSize); + unsigned char *recsDataCompressed = (unsigned char*)RAYGUI_MALLOC(recsDataCompressedSize); memcpy(recsDataCompressed, fileDataPtr, recsDataCompressedSize); fileDataPtr += recsDataCompressedSize;