Changes between Version 2 and Version 3 of Ticket #13416, comment 7
- Timestamp:
- Apr 15, 2022, 8:07:31 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13416, comment 7
v2 v3 17 17 }}} 18 18 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.19 Looking 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. 20 20 21 21 There 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. 22 22 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.23 By the way, there is some commented out code in engines/mohawk/riven_stacks/jspit.cpp:312 that perhaps would work after the fix.