summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-04-08 00:42:04 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-04-08 00:42:04 +0200
commita0c33bdbc4873210598acdccb292ff77fb6bf624 (patch)
treeb440efd69feb954184a71bf882d87cd1d25bb5d7
parent31b459cb1d0ba3280cbc3fc06ce6fab903c07da6 (diff)
fix handling of / as cgi prefix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 38d023f..e89a99a 100644
--- a/main.c
+++ b/main.c
@@ -201,7 +201,7 @@ static void fixup_prefix(char *str)
len = strlen(str) - 1;
- while (len > 0 && str[len] == '/')
+ while (len >= 0 && str[len] == '/')
len--;
str[len + 1] = 0;