Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCI: Workaround for uninit reads during wordsearch for castlebrain #1032

Closed
wants to merge 1 commit into from

Conversation

dafioram
Copy link
Contributor

During the wordsearch puzzle (room 320 click left door) the
game will crash because of an uninitalized read of temp
variables in word::dispatchEvent (which gets called a lot),
if the player clicks the same letter or different letters
aggressively.

A workaround has been added to set all uninitalized temp variables
to 0 in room 320 script 325 to prevent this crash. The index for
the workaround was set to -1 to rather than 14 (temp var 14)
because if just var 14 is fixed then temp var 15 will crash with
an uninitialized read so there is atleast 2 uninitialized temp
vars that are attempted to be read during this time leading to
the bug.

Fixes Trac#9783.

During the wordsearch puzzle (room 320 click left door) the
game will crash because of an uninitalized read of temp
variables in word::dispatchEvent (which gets called a lot),
if the player clicks the same letter or different letters
aggressively.

A workaround has been added to set all uninitalized temp variables
to 0 in room 320 script 325 to prevent this crash. The index for
the workaround was set to -1 to rather than 14 (temp var 14)
because if just var 14 is fixed then temp var 15 will crash with
an uninitialized read so there is atleast 2 uninitialized temp
vars that are attempted to be read during this time leading to
the bug.

Fixes Trac#9783.
@csnover
Copy link
Member

csnover commented Oct 7, 2017

Thanks for the patch! This has landed in ec1cfcb.

@csnover csnover closed this Oct 7, 2017
m-kiewitz referenced this pull request Oct 7, 2017
During the wordsearch puzzle (room 320 click left door) the
game will crash because of an uninitalized read of temp
variables in word::dispatchEvent (which gets called a lot),
if the player clicks the same letter or different letters
aggressively or holds down the enter key.

Fixes Trac#9783.
@dafioram dafioram deleted the castlebrain_wordsearch-fix branch April 15, 2018 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants