summaryrefslogtreecommitdiffstats
path: root/image-sixel.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2023-11-01 10:37:41 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2023-11-01 10:37:41 +0000
commita5545dbc9f576d8f324333942eda562f3b80beeb (patch)
tree539db37caab788260b89fb0b5c43a2b3da77fe4e /image-sixel.c
parentb77778072052c14d1450d2eb89542f2493121f84 (diff)
Allow attributes to have only two parameters, from Tim Culverhouse.
Diffstat (limited to 'image-sixel.c')
-rw-r--r--image-sixel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/image-sixel.c b/image-sixel.c
index 2958d20d..3396a22a 100644
--- a/image-sixel.c
+++ b/image-sixel.c
@@ -137,7 +137,9 @@ sixel_parse_attributes(struct sixel_image *si, const char *cp, const char *end)
if (endptr == last || *endptr != ';')
return (last);
strtoul(endptr + 1, &endptr, 10);
- if (endptr == last || *endptr != ';') {
+ if (endptr == last)
+ return (last);
+ if (*endptr != ';') {
log_debug("%s: missing ;", __func__);
return (NULL);
}