diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 6f845b803..ab4c8605c 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1668,6 +1668,8 @@ curses: with window borders on and align_status:left, restoring brought up a curses: after changing curses_mark_synch() to do something, making a menu selection by entering a count that uses more than 1 digit caused the menu to vanish +curses: setting up default roguesymset at startup clobbered primary symset if + config file picked Enhanced1 for primary (core bug exposed by curses) Qt: at Xp levels above 20 with 'showexp' On, the combined status field "Level:NN/nnnnnnnn" was too big and truncated by a char at each end Qt: searching a text window for something that wasn't found and then searching diff --git a/src/symbols.c b/src/symbols.c index 5ce5ed101..c277c76ab 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -321,6 +321,11 @@ update_rogue_symset(const struct symparse* symp, int val) void clear_symsetentry(int which_set, boolean name_too) { +#ifdef ENHANCED_SYMBOLS + int other_set = (which_set == PRIMARYSET) ? ROGUESET : PRIMARYSET; + enum symset_handling_types old_handling = gs.symset[which_set].handling; +#endif + if (gs.symset[which_set].desc) free((genericptr_t) gs.symset[which_set].desc); gs.symset[which_set].desc = (char *) 0; @@ -337,7 +342,10 @@ clear_symsetentry(int which_set, boolean name_too) gs.symset[which_set].name = (char *) 0; } #ifdef ENHANCED_SYMBOLS - free_all_glyphmap_u(); + /* if 'which_set' was using UTF8, it isn't anymore; if the other set + isn't using UTF8, discard the data for that */ + if (old_handling == H_UTF8 && gs.symset[other_set].handling != H_UTF8) + free_all_glyphmap_u(); purge_custom_entries(which_set); #endif }