From cbb0248bfd0dbd02eb1fc9a239ffcb0609fcb4e4 Mon Sep 17 00:00:00 2001 From: TheUltimateOptimist Date: Mon, 29 Jan 2024 01:11:22 +0100 Subject: [PATCH] refactoring: updated printlf to return early if fakeinput was injected --- src/userinput.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/userinput.c b/src/userinput.c index 3211732..73611a0 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -98,6 +98,9 @@ char *gets(char *message, unsigned long *minLength, unsigned long *maxLength) { } void printlf(long double value) { + if (fakeInput != NULL) { + return; + } if (roundl(value) == value) { printf("%.0Lf", value); }