aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-01-12 21:24:49 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-01-13 21:02:43 +0100
commit924d5bcc73f1c850171d2f0f02be3a502e8d0b86 (patch)
treea8d55a50103f15b225cafe570259fb7ca3be5ee5
parent4c222dd26acb12ce20e0513653595f07dc38db2e (diff)
Fix a issues with assumptions regarding coordinate systemHEADmain
-rw-r--r--src/wmap_parser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wmap_parser.c b/src/wmap_parser.c
index 09ccd69..0d64b08 100644
--- a/src/wmap_parser.c
+++ b/src/wmap_parser.c
@@ -235,11 +235,12 @@ found_separator:
wmap_skip_whitespace(&p, end);
to_start = p;
- /* Find end of 'to' */
- while (p < end && !IS_WHITESPACE(*p)) {
- p++;
+ to_end = end;
+
+ /* Trim trailing whitespace from 'to' */
+ while (to_end > to_start && IS_WHITESPACE(to_end[-1])) {
+ to_end--;
}
- to_end = p;
to_len = to_end - to_start;
if (to_len == 0 || to_len >= WMAP_MAX_NAME_LEN) {