Module Name: src
Committed By: rillig
Date: Sat May 21 12:08:06 UTC 2022
Modified Files:
src/games/gomoku: bdisp.c
Log Message:
gomoku: fix deleting a character when reading a line
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/games/gomoku/bdisp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/gomoku/bdisp.c
diff -u src/games/gomoku/bdisp.c:1.37 src/games/gomoku/bdisp.c:1.38
--- src/games/gomoku/bdisp.c:1.37 Sat May 21 09:25:51 2022
+++ src/games/gomoku/bdisp.c Sat May 21 12:08:06 2022
@@ -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 @@ get_line(char *buf, int size)
continue;
}
cp -= 2;
- addch('\b');
- c = ' ';
- /* FALLTHROUGH */
+ addstr("\b \b");
+ break;
default:
addch(c);
}