Commit 39d3e8b6 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix last change in 'char_width'

* src/character.c (char_width): Make sure variable C is always
initialized.  (Bug#32276)
parent 67679f0c
......@@ -289,15 +289,18 @@ char_width (int c, struct Lisp_Char_Table *dp)
if (VECTORP (disp))
for (i = 0, width = 0; i < ASIZE (disp); i++)
{
int c;
int c = -1;
ch = AREF (disp, i);
if (GLYPH_CODE_P (ch))
c = GLYPH_CODE_CHAR (ch);
else if (CHARACTERP (ch))
c = XFASTINT (ch);
int w = CHARACTER_WIDTH (c);
if (INT_ADD_WRAPV (width, w, &width))
string_overflow ();
if (c >= 0)
{
int w = CHARACTER_WIDTH (c);
if (INT_ADD_WRAPV (width, w, &width))
string_overflow ();
}
}
}
return width;
......
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