Open rkubes opened 5 years ago
Oops. I just saw #87 So this pull request will actually fix the issue reported in #87, but it seems the project is shifting away from using wadgen. I'll leave the Pull Request open for now in case there's a desire to merge this in ahead of the move to using the rom directly.
This was leading to undefined behavior after wadgen completed.
app::main
is anoreturn
function, butWGen_WadgenMain
would return after completing.On my system the
Release
build would segfault after generating the wads, and theDebug
build would launch the main game loop after generating the wads. The expected behavior is the app should gracefully exit after generating the wads.This fix required an
exit(0)
to be called from withinWGen_WadgenMain
, and I felt the call logically belonged in theWGen_ShutDownApplication
function. Furthermore, both functions are now appropriate marked asnoreturn
.