The function end() of a list does not return the last element but a fake element
after the last one, for the need of the iterator.
Trying to access to the data of the element returned by end() and that has no
such field, that caused a stack buffer overflow, reading uninitialized data.
Called function back() instead, to get the last element of the list.
The builtin font emerFont is currently used to display FPS.
Each graphics engine reads this array to render each of the 96 characters,
from 32 to 127 the ASCII table.
TinyGL and OpenGL-shaders read the array out of bound because they read
data for the 96th character in emerFont that only describes 95.
No problem was hightlighted with OpenGL engine because it only read 95
characters, with no consequence as the character 127 is DEL, so never
displayed.
To be compliant with the global implementation, data for character 127
is added in emerFont (will display nothing) and the OpenGL engine is
changed accordingly.
In EMI and GRIM games, a resource leak was found with OpenGL and
OpenGL-shaders engines: releaseMovieFrame() was not called in the destructor
of these graphics drivers (and never called at all on exit).
This patch calls explicitely realeaseMovieFrame.
Note that is was already done correctly with TinyGL.
After having installed EMI data and started the game, if we are in the situation
where it is asked to rename resource file FullMonkeyMap.imt from both CDs
into FullMonkeyMap1.imt and FullMonkeyMap2.imt, the game tries to start but
leads to an immediate segmentation fault.
In EMISound::setMusicState, _musicTable is checked againt nullptr but ... after
it is used. This check is moved up.
Instead of showing subengines directly under their parent engine, like:
illusions Illusions Engine engine
kyra Kyra engine
lol Lands of Lore in Kyra engine
eob Eye of the Beholder in Kyra engine
lab Labyrinth of Time engine
Show them slightliy indented, like:
illusions Illusions Engine engine
kyra Kyra engine
- lol Lands of Lore in Kyra engine
- eob Eye of the Beholder in Kyra engine
lab Labyrinth of Time engine
It keeps the list sorted, and makes it easier to skim through it.
There are many situations that GM sounds worse than MT, even for games
that were written for GM.
I think this is related to this.
And, there is a note in midi.cpp:
// NOTE: SSCI uses channels 1 through 8 for General MIDI as well, in the drivers I checked
Also, issue #6686 reports that using the "higher" channels causes
problem on a real SC-55.
This change solves at least: #6686, #9735 and #10297
Add three tests:
- exit during repeat with
- return during repeat with
- handle list expr and not a variable in repeat with
The last test is added since it's not supported and breaks
code execution.