We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 07ff6dd + fa364ad commit 43400b4Copy full SHA for 43400b4
utf8.c
@@ -95,13 +95,11 @@ static int git_wcwidth(ucs_char_t ch)
95
return -1;
96
97
/* binary search in table of non-spacing characters */
98
- if (bisearch(ch, zero_width, sizeof(zero_width)
99
- / sizeof(struct interval) - 1))
+ if (bisearch(ch, zero_width, ARRAY_SIZE(zero_width) - 1))
100
return 0;
101
102
/* binary search in table of double width characters */
103
- if (bisearch(ch, double_width, sizeof(double_width)
104
+ if (bisearch(ch, double_width, ARRAY_SIZE(double_width) - 1))
105
return 2;
106
107
return 1;
0 commit comments