Fix out-of-bounds error when incorporating email from stdin
[mmh] / sbr / getanswer.c
index 4707255..4de8a89 100644 (file)
@@ -8,15 +8,16 @@
 
 #include <h/mh.h>
 #include <stdio.h>
+#include <unistd.h>
 
 
 int
-getanswer (char *prompt)
+getanswer(char *prompt)
 {
        static int interactive = -1;
 
        if (interactive < 0)
-               interactive = isatty (fileno (stdin)) ? 1 : 0;
+               interactive = isatty(fileno(stdin)) ? 1 : 0;
 
-       return (interactive ? gans (prompt, anoyes) : 1);
+       return (interactive ? gans(prompt, anoyes) : 1);
 }