diff options
author | nicm <nicm> | 2021-02-18 13:30:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-02-18 13:30:24 +0000 |
commit | fb42ae3071763fdc6a2fe2e57feec774623b1c33 (patch) | |
tree | 2687ece807c5d27fb39a3a95386b2c128b3311e8 /input.c | |
parent | af3ffa9c41936078d27b5ba1f96cec67850f98cb (diff) | |
download | rtmux-fb42ae3071763fdc6a2fe2e57feec774623b1c33.tar.gz rtmux-fb42ae3071763fdc6a2fe2e57feec774623b1c33.tar.bz2 rtmux-fb42ae3071763fdc6a2fe2e57feec774623b1c33.zip |
Reduce len when moving past spaces in OSC 11 parameter.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2460,8 +2460,10 @@ input_osc_parse_colour(const char *p) (1 - m) * (1 - k) * 255, (1 - y) * (1 - k) * 255); } else { - while (*p == ' ') + while (len != 0 && *p == ' ') { p++; + len--; + } while (len != 0 && p[len - 1] == ' ') len--; copy = xstrndup(p, len); |