mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config: value_to_pt_or_px(): don’t allow empty px values (key=px)
This commit is contained in:
parent
59018446fd
commit
7bf150c11a
1 changed files with 1 additions and 1 deletions
2
config.c
2
config.c
|
|
@ -651,7 +651,7 @@ value_to_pt_or_px(struct context *ctx, struct pt_or_px *res)
|
|||
char *end = NULL;
|
||||
|
||||
long value = strtol(s, &end, 10);
|
||||
if (!(errno == 0 && end == s + len - 2)) {
|
||||
if (!(len > 2 && errno == 0 && end == s + len - 2)) {
|
||||
LOG_CONTEXTUAL_ERR("invalid px value (must be in the form 12px)");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue