'sortdiscoveries:s' had a spurious generic header shown at the start of the
last class if there were any artifacts or unique items discovered
loss of saddle by opening magic left hero mounted on unsaddled steed
+avoid segfault during error reporting for bad 'O' value(s) after theme rooms
+ have been initialized, leaving iflags.in_lua set
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
buf = "Unknown error";
if (iflags.in_lua) {
- struct _config_error_errmsg *dat = (struct _config_error_errmsg *) alloc(sizeof (struct _config_error_errmsg));
+ struct _config_error_errmsg *dat
+ = (struct _config_error_errmsg *) alloc(sizeof *dat);
dat->next = config_error_msg;
dat->line_num = config_error_data->line_num;
} else {
/* success; save state for this dungeon branch */
g.luathemes[u.uz.dnum] = (genericptr_t) themes;
+ /* keep themes context, so not 'nhl_done(themes);' */
+ iflags.in_lua = FALSE; /* can affect error messages */
}
}
if (!themes) /* don't try again when making next level */
}
} else {
if (themes) {
- g.in_mk_themerooms = TRUE;
+ iflags.in_lua = g.in_mk_themerooms = TRUE;
g.themeroom_failed = FALSE;
lua_getglobal(themes, "themerooms_generate");
lua_call(themes, 0, 0);
- g.in_mk_themerooms = FALSE;
+ iflags.in_lua = g.in_mk_themerooms = FALSE;
if (g.themeroom_failed
&& ((themeroom_tries++ > 10)
|| (g.nroom >= (MAXNROFROOMS / 6))))