SCI: Improve reg_t initialization sequence#6638
Conversation
* A single function instead of call to setSegment and inline setOffset. * Checks SCI version only once. * Initializes _segment directly with both values instead of twice. * Fixes -Wmaybe-uninitialized GCC warning. This reverts commit 33643c7.
|
Looks good, thanks! |
|
Ugh. This wasn't tested at all - it crashes on startup. Will provide a proper fix. |
|
Regression fixed in 80c635b |
Just for the record - It was tested (and works) on release. The crash is a failed assertion, which only happens on debug build. |
That assertion was triggered because SCI version isn't initialized before the engine starts. It's a fundamental issue. The fact that the assert isn't thrown in release builds doesn't mean much :) |
|
I understand, but for release build assert is no-op. Quoting the man page:
|
That is not correct. assert is a no-op if |
It is correct for cmake apparently. I'll try to remove the flag. |
This reverts commit 33643c7.