Commit 5874a24c authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(compose_chars_in_text): Fix setup of `pend'.

Unconditionally reload `ptr' and `pend' after eval.
parent 0fdbe302
......@@ -616,7 +616,7 @@ compose_chars_in_text (start, end, string)
GCPRO1 (string);
stop = end;
ptr = SDATA (string) + string_char_to_byte (string, start);
pend = ptr + SBYTES (string);
pend = SDATA (string) + SBYTES (string);
}
else
{
......@@ -680,10 +680,19 @@ compose_chars_in_text (start, end, string)
{
start += XINT (val);
if (STRINGP (string))
ptr = SDATA (string) + string_char_to_byte (string, start);
{
ptr = SDATA (string) + string_char_to_byte (string, start);
pend = SDATA (string) + SBYTES (string);
}
else
ptr = CHAR_POS_ADDR (start);
}
else if (STRINGP (string))
{
start++;
ptr = SDATA (string) + string_char_to_byte (string, start);
pend = SDATA (string) + SBYTES (string);
}
else
{
start++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment