aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs
diff options
context:
space:
mode:
authorColin Snover2016-08-13 09:35:39 -0500
committerColin Snover2016-08-13 15:41:31 -0500
commit741ac22e176934cdb7bca38c9880cb41f85de763 (patch)
tree5f413efae229adca21fdda6c55dc5af9b7ffe573 /engines/titanic/npcs
parent786f2ca4487ea852bf3f4b95dbafc8499ed526cb (diff)
downloadscummvm-rg350-741ac22e176934cdb7bca38c9880cb41f85de763.tar.gz
scummvm-rg350-741ac22e176934cdb7bca38c9880cb41f85de763.tar.bz2
scummvm-rg350-741ac22e176934cdb7bca38c9880cb41f85de763.zip
SCI: Fix pointer invalidation caused by array storage moves
When objects are added to a SegmentObjTable, it may cause the internal storage for the table to expand and move to a new region of memory. When this happens, all pointers to objects held by a SegmentObjTable of the same type would be invalidated, due to an implementation detail that should not be exposed. To prevent this, objects are now allocated separately on the heap, so even if the table's storage moves due to insertions, the objects owned by the table will not, so references remain valid for the lifetime of the object.
Diffstat (limited to 'engines/titanic/npcs')
0 files changed, 0 insertions, 0 deletions