Found a place where 1TBS was not used, and fixed it.
authorArt Cancro <ajc@citadel.org>
Wed, 20 Dec 2023 15:50:53 +0000 (10:50 -0500)
committerArt Cancro <ajc@citadel.org>
Wed, 20 Dec 2023 15:50:53 +0000 (10:50 -0500)
1TBS is important.  People who do not use 1TBS are literally Hitler.

webcit-ng/server/util.c

index e14dcd2e4e802df834b6996dda6f0ed3cf587fde..dc51ab3ba9513461df8ce27dacac6a9148990823 100644 (file)
@@ -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;
                        }
                }