diff options
author | June McEnroe <june@causal.agency> | 2020-04-03 15:16:49 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-03 15:16:49 -0400 |
commit | 6574f012c9480662778464bab23413501658a8e0 (patch) | |
tree | 187044f275bff223a9f38d54b4852b182629f7e0 /command.c | |
parent | Use a for loop for getopt (diff) | |
download | catgirl-6574f012c9480662778464bab23413501658a8e0.tar.gz catgirl-6574f012c9480662778464bab23413501658a8e0.zip |
Only treat /open param as count if single digit
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
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); } |