mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Fix issue with writing to an array of std::strings. Use sizeof(std::string) instead of sizeof(char *).
This commit is contained in:
parent
4c1271b43b
commit
8132c00165
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user