summaryrefslogtreecommitdiff
path: root/games/velena/patches/patch-ab
blob: 95149215da5df046fbd7c9bf405658e1719876be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$NetBSD: patch-ab,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $

--- cmdline.c.orig	2007-07-25 01:53:41.000000000 +0200
+++ cmdline.c	2007-07-25 01:54:04.000000000 +0200
@@ -51,7 +51,8 @@ void command_line_input(struct board *bo
 
      do {
         printf(">");   // Waiting for the user to enter the string
-        gets(st);
+        if (fgets(st, sizeof(st), stdin) == NULL)
+            break;
 
         if(st[0]=='q') flag = 0;   // if the string begins with 'q' we quit.
         else {