summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-03 15:16:49 -0400
committerJune McEnroe <june@causal.agency>2020-04-03 15:16:49 -0400
commit6574f012c9480662778464bab23413501658a8e0 (patch)
tree187044f275bff223a9f38d54b4852b182629f7e0 /command.c
parentUse a for loop for getopt (diff)
downloadcatgirl-6574f012c9480662778464bab23413501658a8e0.tar.gz
catgirl-6574f012c9480662778464bab23413501658a8e0.zip
Only treat /open param as count if single digit
Diffstat (limited to '')
-rw-r--r--command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/command.c b/command.c
index 5872bdc..adcc0c8 100644
--- a/command.c
+++ b/command.c
@@ -337,8 +337,8 @@ static void commandClose(uint id, char *params) {
 static void commandOpen(uint id, char *params) {
 	if (!params) {
 		urlOpenCount(id, 1);
-	} else if (isdigit(params[0])) {
-		urlOpenCount(id, strtoul(params, NULL, 10));
+	} else if (isdigit(params[0]) && !params[1]) {
+		urlOpenCount(id, params[0] - '0');
 	} else {
 		urlOpenMatch(id, params);
 	}
ref='/src/commit/port/file2c/Makefile?id=a75b5b298bc9cff3ffb5cbe53336651e179dc6ec&follow=1'>Rewrite port makefiles consistentlyJune McEnroe 2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe 2019-07-27Remove scheme text linkJune McEnroe 2019-07-26Update Dark.terminalJune McEnroe 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe 2019-07-24Remove histedit from bitJune McEnroe