mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04:00
[unicode] Fix issue with negative value of cells. Refs #126
Bug appeared in 0.13.5.
This commit is contained in:
parent
0e17711e77
commit
5371f1874a
@ -129,9 +129,8 @@ static const struct RangeLut RANGE_LUT_LIST[] = {
|
||||
};
|
||||
static const int RANGE_LUT_LIST_SIZE = 4;
|
||||
|
||||
|
||||
int
|
||||
unicode_to_cell(unicode_val_T ucs4)
|
||||
static int
|
||||
unicode_to_cell_konsole(unicode_val_T ucs4)
|
||||
{
|
||||
const struct RangeLut *rl;
|
||||
|
||||
@ -158,3 +157,11 @@ unicode_to_cell(unicode_val_T ucs4)
|
||||
|
||||
return RANGE_LUT_LIST[RANGE_LUT_LIST_SIZE - 1].width;
|
||||
}
|
||||
|
||||
int
|
||||
unicode_to_cell(unicode_val_T ucs4)
|
||||
{
|
||||
int res = unicode_to_cell_konsole(ucs4);
|
||||
|
||||
return res >= 0 ? res : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user