aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 442baf7..f4aeca8 100644
--- a/re.c
+++ b/re.c
@@ -30,7 +30,7 @@ main(int argc, char *argv[])
if(!access(file, F_OK)){
do
fprintf(stderr, "%s already exists; overwrite? ", file);
- while(!gets(ans) || !*ans);
+ while(!fgets(ans, 10, stdin) || ans[0] == '\n');
if(ans[0] != 'y') return 1;
}