Fix bug in akgl_heap_release_actor preventing it from being cleared out of the registry

This commit is contained in:
2026-05-13 19:28:38 -04:00
parent dc2e88b72f
commit 9443fa8532
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#ifndef _SDL_GAMECONTROLLERDB_H_ #ifndef _SDL_GAMECONTROLLERDB_H_
#define _SDL_GAMECONTROLLERDB_H_ #define _SDL_GAMECONTROLLERDB_H_
// Taken from https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt on Wed May 13 04:55:09 PM EDT 2026 // Taken from https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt on Wed May 13 07:27:47 PM EDT 2026
#define AKGL_SDL_GAMECONTROLLER_DB_LEN 2228 #define AKGL_SDL_GAMECONTROLLER_DB_LEN 2228

View File

@@ -121,8 +121,8 @@ akerr_ErrorContext *akgl_heap_release_actor(akgl_Actor *ptr)
if ( ptr->basechar != NULL ) { if ( ptr->basechar != NULL ) {
CATCH_AND_RETURN(errctx, akgl_heap_release_character(ptr->basechar)); CATCH_AND_RETURN(errctx, akgl_heap_release_character(ptr->basechar));
} }
memset(ptr, 0x00, sizeof(akgl_Actor));
SDL_ClearProperty(AKGL_REGISTRY_ACTOR, (char *)&ptr->name); SDL_ClearProperty(AKGL_REGISTRY_ACTOR, (char *)&ptr->name);
memset(ptr, 0x00, sizeof(akgl_Actor));
} }
SUCCEED_RETURN(errctx); SUCCEED_RETURN(errctx);
} }