Changes between Initial Version and Version 1 of Ticket #13416, comment 7
- Timestamp:
- Apr 15, 2022, 7:53:58 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13416, comment 7
initial v1 17 17 }}} 18 18 19 Looking around I noticed that in 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/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. 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.