diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-12 12:00:55 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-12 12:00:55 +0200 |
commit | 059f5b13acf3774b279125b3b568b55e13680ac6 (patch) | |
tree | 50b5b432165a8a310709596615405f053efc105c | |
parent | 1fae647e7924b96aea930ff56345ed9fa8d29a1e (diff) | |
download | re-name-059f5b13acf3774b279125b3b568b55e13680ac6.tar.gz |
re.c: Use fgets
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |