config: letter-spacing: add missing ‘return’

The missing return caused us to fall through to the bottom of the
function, where we ended with an error message:

  [main].letter-spacing: 0: not a valid option: letter-spacing

Closes #795
This commit is contained in:
Daniel Eklöf 2021-11-15 19:22:06 +01:00
parent c645be7585
commit b22322bfd1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 1 deletions

View file

@ -46,6 +46,11 @@
### Deprecated
### Removed
### Fixed
* Regression: `letter-spacing` resulting in a “not a valid option”
error (https://codeberg.org/dnkl/foot/issues/795).
### Security
### Contributors

View file

@ -956,7 +956,7 @@ parse_section_main(struct context *ctx)
return value_to_pt_or_px(ctx, &conf->line_height);
else if (strcmp(key, "letter-spacing") == 0)
value_to_pt_or_px(ctx, &conf->letter_spacing);
return value_to_pt_or_px(ctx, &conf->letter_spacing);
else if (strcmp(key, "horizontal-letter-offset") == 0)
return value_to_pt_or_px(ctx, &conf->horizontal_letter_offset);