Changes between Version 2 and Version 3 of Ticket #13416, comment 7


Ignore:
Timestamp:
04/15/22 20:07:31 (8 months ago)
Author:
marcvinyals

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13416, comment 7

    v2 v3  
    1717}}}
    1818
    19 Looking around I noticed that in engines/mohawk/riven_stacks/jspit.cpp, line 170 variable commandCount is used as the end condition for the loop, but it would make more sense to use variable argumentCount instead. So I tried that and now valgrind is happy and I do not hit the bug anymore. I submitted a pull request as https://github.com/scummvm/scummvm/pull/3811.
     19Looking around I noticed that in engines/mohawk/riven_stacks/riven_scripts.cpp, line 170 variable commandCount is used as the end condition for the loop, but it would make more sense to use variable argumentCount instead. So I tried that and now valgrind is happy and I do not hit the bug anymore. I submitted a pull request as https://github.com/scummvm/scummvm/pull/3811.
    2020
    2121There is only one other call to createScriptFromData() where commandCount is different from argumentCount, namely engines/mohawk/riven_stacks/aspit.cpp:377, so it is not that surprising that this is the only place where the problem occurs.
    2222
    23 By the way, there is some commented out code in engines/mohawk/riven_stacks/riven_scripts.cpp:312 that perhaps would work after the fix.
     23By the way, there is some commented out code in engines/mohawk/riven_stacks/jspit.cpp:312 that perhaps would work after the fix.