From 07960b142c000ac1a126b2af898df554b132e9de Mon Sep 17 00:00:00 2001 From: timoreo Date: Wed, 10 Jan 2024 17:02:11 +0100 Subject: [PATCH] Fix haxxer typer --- src/hackertyper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hackertyper.c b/src/hackertyper.c index e4dd2ea..9f01b6d 100644 --- a/src/hackertyper.c +++ b/src/hackertyper.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) { while (!feof(command_output_fptr)) { getchar(); - for (unsigned int i = 0; i < CHARS_TO_WRITE; i++) { + for (unsigned int i = 0; i < CHARS_TO_WRITE && !feof(command_output_fptr); i++) { current_char = fgetc(command_output_fptr); printf("%c", current_char); }