kichikuou / xsystem35-sdl2

Multi-platform implementation of AliceSoft's System3.x game engine.
https://kichikuou.github.io/web/
GNU General Public License v2.0
61 stars 8 forks source link

Fix segfault in message.c #2

Closed nunuhara closed 5 years ago

nunuhara commented 5 years ago

Fix segfaults that can occur when certain message-related commands are issued before initializing nact->msg.win (via B4 command).

For some reason the English translation of Rance IV issues a bunch of newline commands (command 'R') at startup before msg.win is initialized, causing the game to segfault immediately. This replaces the segfault with a warning.

kichikuou commented 5 years ago

Thanks for the patch.

It seems the original system39.exe has a default message window and accepts text commands before B4, so I fixed that way: https://github.com/kichikuou/xsystem35-sdl2/commit/d91b4f9d5a851fb31f79a6ec071ca2cbc8c0f40f