summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/talk.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 138dde54..70bcdb97 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -3487,20 +3487,29 @@ FindAngel(void){
static inline void
GotoNewHand(){
- if (currutmp && currutmp->mode != EDITING){
- char old_board[IDLEN + 1] = "";
- if (currboard[0])
- strlcpy(old_board, currboard, IDLEN + 1);
+ char old_board[IDLEN + 1] = "";
+ int canRead = 1;
- if (enter_board(GLOBAL_NEWBIE)==0) {
- Read();
- }
+ if (currutmp && currutmp->mode == EDITING)
+ return;
- if (old_board[0])
- enter_board(old_board);
+ // usually crashed as 'assert(currbid == brc_currbid)'
+ if (currboard[0]) {
+ strlcpy(old_board, currboard, IDLEN + 1);
+ currboard = "";// force enter_board
}
+
+ if (enter_board(GLOBAL_NEWBIE) == 0)
+ canRead = 1;
+
+ if (canRead)
+ Read();
+
+ if (canRead && old_board[0])
+ enter_board(old_board);
}
+
static inline void
NoAngelFound(const char* msg){
move(b_lines, 0);