diff options
| author | Pip Cet <pipcet@protonmail.com> | 2026-05-24 09:17:44 +0000 |
|---|---|---|
| committer | Pip Cet <pipcet@protonmail.com> | 2026-05-24 09:23:05 +0000 |
| commit | c146e3643c4eb2fc52fa730df9388544a31feb40 (patch) | |
| tree | f049bc2ea738c5c858cf98961563d86c51612ce5 /src | |
| parent | 6932c940fda848422cb6c66c81c9d7a108e8320b (diff) | |
Fix off-by-one error in 'styled_format'
This would (rarely) result in composition properties being shared
across the concatenation of two copies of a string.
* src/editfns.c (styled_format): Include the first argument in the
range.
* test/src/editfns-tests.el (editfns-tests--format-composition-property):
New.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index 341e241dfcb..4089edb1074 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4398,7 +4398,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) props = extend_property_ranges (props, len, new_len); /* If successive arguments have properties, be sure that the value of `composition' property be the copy. */ - if (1 < i && info[i - 1].end) + if (1 <= i && info[i - 1].end) make_composition_value_copy (props); add_text_properties_from_list (val, props, make_fixnum (info[i].start)); |
