Fix last change in 'char_width'
* src/character.c (char_width): Make sure variable C is always initialized. (Bug#32276)
This commit is contained in:
parent
67679f0c08
commit
39d3e8b6bc
1 changed files with 7 additions and 4 deletions
|
@ -289,15 +289,18 @@ char_width (int c, struct Lisp_Char_Table *dp)
|
||||||
if (VECTORP (disp))
|
if (VECTORP (disp))
|
||||||
for (i = 0, width = 0; i < ASIZE (disp); i++)
|
for (i = 0, width = 0; i < ASIZE (disp); i++)
|
||||||
{
|
{
|
||||||
int c;
|
int c = -1;
|
||||||
ch = AREF (disp, i);
|
ch = AREF (disp, i);
|
||||||
if (GLYPH_CODE_P (ch))
|
if (GLYPH_CODE_P (ch))
|
||||||
c = GLYPH_CODE_CHAR (ch);
|
c = GLYPH_CODE_CHAR (ch);
|
||||||
else if (CHARACTERP (ch))
|
else if (CHARACTERP (ch))
|
||||||
c = XFASTINT (ch);
|
c = XFASTINT (ch);
|
||||||
int w = CHARACTER_WIDTH (c);
|
if (c >= 0)
|
||||||
if (INT_ADD_WRAPV (width, w, &width))
|
{
|
||||||
string_overflow ();
|
int w = CHARACTER_WIDTH (c);
|
||||||
|
if (INT_ADD_WRAPV (width, w, &width))
|
||||||
|
string_overflow ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
|
|
Loading…
Add table
Reference in a new issue