[Bug Fix] Fix use-after-free corruption with some DB calls (#1335)

This commit is contained in:
Michael Cook (mackal)
2021-04-27 19:53:34 -04:00
committed by GitHub
parent c063d9512e
commit 4358e24dab
6 changed files with 30 additions and 23 deletions
+2 -2
View File
@@ -901,7 +901,7 @@ bool lua_delete_data(std::string bucket_key) {
return DataBucket::DeleteData(bucket_key);
}
const char *lua_get_char_name_by_id(uint32 char_id) {
std::string lua_get_char_name_by_id(uint32 char_id) {
return database.GetCharNameByID(char_id);
}
@@ -937,7 +937,7 @@ int lua_get_group_id_by_char_id(uint32 char_id) {
return database.GetGroupIDByCharID(char_id);
}
const char *lua_get_npc_name_by_id(uint32 npc_id) {
std::string lua_get_npc_name_by_id(uint32 npc_id) {
return quest_manager.getnpcnamebyid(npc_id);
}