Age | Commit message (Collapse) | Author |
|
Fixes Trac#10251.
|
|
kArrayCopy would perform an unnecessary memory copy of the source
array, the treatment of the count value as unsigned was clearly
not correct since it was being sign-extended and checked against
-1.
|
|
This fixes a use-after-free in GK2 when restoring a second save
game, when the List reg_t is still considered valid but the List
has moved due to a partial game restore.
|
|
In GK2, restoring a save game causes the segment manager to reset
in the middle of a kListFirstTrue call, which invalidates all
pointers and reg_ts to stored data. This means that when
kListFirstTrue tries to decrement the list recursion counter at
the end of iteration, it is writing to freed memory, potentially
resulting in heap corruption.
SCI3 added checks to prevent this from happening, but these checks
seem like they should have also been applied to some SCI2.1 games
as well (like GK2).
Since there should be no negative side-effect to this check, it
is applied universally to all SCI32 games.
|
|
Used by Hoyle5.
Also includes a tiny amount of cleanup in kAddAfter for
consistency with kAddBefore.
|
|
This change ensures that these kernel calls operate in the same
manner that they did in SSCI.
|
|
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
|
|
CID 1361599.
|
|
Happens in Torin when examining Di's locket in chapter 3
|
|
This is a better check than the one in commit 3d1f1a3a21
|
|
The list in kListEachElementDo may be invalidated after a
selector invocation
|
|
This happens in e.g. Phant1, when walking from dining, to
reception, to up the stairs.
|
|
(didn't work since the introduction of kString signatures and the
kString split-up)
|
|
|
|
|
|
This makes the character import screen in QFG4 functional, as the virtual
file index was never updated
|
|
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
|
|
This is used by Torin's Passage (e.g. when trying to open the menu).
Based on a slightly modified patch by LePhilousophe
|
|
|
|
|
|
The game will now start (but won't do anything exciting - it'll display
its main menu, which doesn't work yet)
|
|
|
|
svn-id: r55086
|
|
svn-id: r55085
|
|
such values in SCI3
svn-id: r55002
|
|
svn-id: r54990
|
|
simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
|
|
svn-id: r54402
|
|
games, and updated their subops accordingly
svn-id: r54399
|
|
the actual game! :D
svn-id: r54377
|
|
svn-id: r54373
|
|
SCI3 games)
svn-id: r54364
|
|
SCI2 strings inherit from arrays, plus kArray and kString are almost the
same, so this is all possible. This is needed, as SCI scripts copy
strings on arrays and then process them as such (e.g. in RAMA and LSL7)
However, we really need to merge SCI2 array types with the SCI2 string
types, and ultimately merge the code with the SCI1 array and string types.
svn-id: r54340
|
|
This ensures that the pointer to the element that lookupArray() returned
won't be invalidated in case the array is reallocated because of
allocateArray() - same issue as in kClone()
svn-id: r54306
|
|
svn-id: r52182
|
|
svn-id: r51156
|
|
svn-id: r51153
|
|
respective files
svn-id: r51108
|
|
svn-id: r50960
|
|
- Split SCI2 from SCI2.1 signature checks
- Added signature checking for the subops of the SCI2.1 kernel call kList
- Added support for calls to kAddToFront and kAddToEnd with 3 parameters (unimplemented code uncovered by the signature checks)
- Added a FIXME for a potential incorrect subop (uncovered by the signature checks), which might be related to the crashes in the demo of Torin's Passage
svn-id: r50861
|
|
svn-id: r50549
|
|
example)
svn-id: r50537
|
|
parameters, and we don't know what the 4th parameter is yet
svn-id: r50528
|
|
node. Also, a slight fix in VM debug code.
svn-id: r50521
|
|
svn-id: r50517
|
|
kDeleteKey, as it might be referenced again before the GC is invoked
svn-id: r50516
|
|
nodes. Fixes cases where game scripts could reference a list node after it was deleted (e.g. QFG1 intro, Longbow when exiting the cave). Some slight cleanup
svn-id: r50515
|
|
If one of these is triggered for you, you can add an exception to
the error, together with a comment explaining why this exception
is necessary. Ideally after verifying that the cause is a script
bug and not a bug in our code...
svn-id: r50442
|
|
svn-id: r50284
|
|
we should not change the stack again like we do in op_link - this is what Sierra is doing). Some cleanup
svn-id: r50207
|