Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/gomoku gomoku: fix deleting a character when reading a...



details:   https://anonhg.NetBSD.org/src/rev/29a67a752935
branches:  trunk
changeset: 366270:29a67a752935
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat May 21 12:08:06 2022 +0000

description:
gomoku: fix deleting a character when reading a line

diffstat:

 games/gomoku/bdisp.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 0e91bfe5d975 -r 29a67a752935 games/gomoku/bdisp.c
--- a/games/gomoku/bdisp.c      Sat May 21 10:33:05 2022 +0000
+++ b/games/gomoku/bdisp.c      Sat May 21 12:08:06 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bdisp.c,v 1.37 2022/05/21 09:25:51 rillig Exp $        */
+/*     $NetBSD: bdisp.c,v 1.38 2022/05/21 12:08:06 rillig Exp $        */
 
 /*
  * Copyright (c) 1994
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 /*     @(#)bdisp.c     8.2 (Berkeley) 5/3/95   */
-__RCSID("$NetBSD: bdisp.c,v 1.37 2022/05/21 09:25:51 rillig Exp $");
+__RCSID("$NetBSD: bdisp.c,v 1.38 2022/05/21 12:08:06 rillig Exp $");
 
 #include <curses.h>
 #include <string.h>
@@ -303,9 +303,8 @@
                                        continue;
                                }
                                cp -= 2;
-                               addch('\b');
-                               c = ' ';
-                               /* FALLTHROUGH */
+                               addstr("\b \b");
+                               break;
                        default:
                                addch(c);
                        }



Home | Main Index | Thread Index | Old Index