mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
FIX: Returning freed pointer from a function.
This commit is contained in:
parent
247360cbf0
commit
e5a4229ce3
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ extern "C" {
|
||||||
char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc) {
|
char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc) {
|
||||||
std::string hashStr = Ship::GlobalCtx2::GetInstance()->GetResourceManager()->HashToString(crc);
|
std::string hashStr = Ship::GlobalCtx2::GetInstance()->GetResourceManager()->HashToString(crc);
|
||||||
strcpy(alloc, hashStr.c_str());
|
strcpy(alloc, hashStr.c_str());
|
||||||
return (char*)hashStr.c_str();
|
return alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc) {
|
Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue