From e5a4229ce30ed416320af1136f64f38897a61320 Mon Sep 17 00:00:00 2001 From: ruben Date: Sun, 15 May 2022 13:59:21 +0200 Subject: [PATCH] FIX: Returning freed pointer from a function. --- libultraship/libultraship/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 588e3af50..6cb43b465 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -122,7 +122,7 @@ extern "C" { char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc) { std::string hashStr = Ship::GlobalCtx2::GetInstance()->GetResourceManager()->HashToString(crc); strcpy(alloc, hashStr.c_str()); - return (char*)hashStr.c_str(); + return alloc; } Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc) {