module/script: ‘9’ is a valid digit

The script module incorrectly rejected range tag end values containing
the digit ‘9’.

Closes #60
This commit is contained in:
Daniel Eklöf 2021-06-19 14:19:31 +02:00
parent 8fc0d148c8
commit 60ee992a73
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 3 additions and 1 deletions

View file

@ -38,6 +38,8 @@
(https://codeberg.org/dnkl/yambar/issues/45).
* Crash when a string particle contained `{}`
(https://codeberg.org/dnkl/yambar/issues/48).
* `script` module rejecting range tag end values containing the digit
`9` (https://codeberg.org/dnkl/yambar/issues/60).
### Security

View file

@ -180,7 +180,7 @@ process_line(struct module *mod, const char *line, size_t len)
long end = 0;
for (size_t i = 0; i < end_len; i++) {
if (!(_end[i] >= '0' && _end[i] < '9')) {
if (!(_end[i] >= '0' && _end[i] <= '9')) {
LOG_ERR(
"tag range end is not an integer: %.*s",
(int)end_len, _end);