25 lines
765 B
Plaintext
25 lines
765 B
Plaintext
$OpenBSD: patch-guage_c,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
|
|
--- guage.c.orig Sat Aug 12 00:54:52 1995
|
|
+++ guage.c Fri Oct 26 23:53:28 2007
|
|
@@ -86,16 +86,16 @@ dialog_guage (const char *title, const char *prompt, i
|
|
|
|
if (feof (stdin))
|
|
break;
|
|
- gets (buf);
|
|
+ fgets (buf, sizeof(buf), stdin);
|
|
if (buf[0] == 'X') {
|
|
/* Next line is percentage */
|
|
- gets (buf);
|
|
+ fgets (buf, sizeof(buf), stdin);
|
|
percent = atoi (buf);
|
|
|
|
/* Rest is message text */
|
|
prompt_buf[0] = '\0';
|
|
- while (strncmp (gets (buf), "XXX", 3))
|
|
- strcat (prompt_buf, buf);
|
|
+ while (strncmp (fgets (buf, sizeof(buf), stdin), "XXX", 3))
|
|
+ strlcat (prompt_buf, buf, sizeof(prompt_buf));
|
|
prompt = prompt_buf;
|
|
} else
|
|
percent = atoi (buf);
|