From 9156c9b8457a956712b129de23f35a607c2cb0ec Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 20 Dec 2023 10:50:53 -0500 Subject: [PATCH] Found a place where 1TBS was not used, and fixed it. 1TBS is important. People who do not use 1TBS are literally Hitler. --- webcit-ng/server/util.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webcit-ng/server/util.c b/webcit-ng/server/util.c index e14dcd2e4..dc51ab3ba 100644 --- a/webcit-ng/server/util.c +++ b/webcit-ng/server/util.c @@ -21,10 +21,11 @@ int unescape_input(char *buf) { a = 0; while (a < buflen) { - if (buf[a] == '+') + if (buf[a] == '+') { buf[a] = ' '; + } if (buf[a] == '%') { - // don't let % chars through, rather truncate the input. + // don't let % chars through - instead truncate the input. if (a + 2 > buflen) { buf[a] = '\0'; buflen = a; @@ -37,9 +38,9 @@ int unescape_input(char *buf) { b = decode_hex(hex); buf[a] = (char) b; len = buflen - a - 2; - if (len > 0) + if (len > 0) { memmove(&buf[a + 1], &buf[a + 3], len); - + } buflen -= 2; } } -- 2.30.2