Fix issue with writing to an array of std::strings. Use sizeof(std::string) instead of sizeof(char *).

This commit is contained in:
Thomas Brain 2022-08-24 09:53:57 -05:00
parent 4c1271b43b
commit 8132c00165

View File

@ -251,7 +251,7 @@ int Trick::MemoryManager::assign_recursive(void* base_addr, ATTRIBUTES* attr, in
}
break;
case TRICK_STRING :
assign_addr = (char*)base_addr + offset * sizeof(char*);
assign_addr = (char*)base_addr + offset * sizeof(std::string);
if (v_tree && v_tree->v_data) {
*(std::string*)assign_addr = vval_string(v_tree->v_data);
} else {