mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 09:58:12 +02:00
[truetype] Fix gcc warning about possibly-infinite-loops
This commit is contained in:
parent
178789c37a
commit
849159ddd1
1 changed files with 6 additions and 5 deletions
|
|
@ -1245,12 +1245,13 @@ _cairo_truetype_reverse_cmap (cairo_scaled_font_t *scaled_font,
|
|||
uint16_t g_id_be = cpu_to_be16 (index);
|
||||
int j;
|
||||
|
||||
for (j = 0; j < range_size; j++) {
|
||||
if (glyph_ids[j] == g_id_be) {
|
||||
*ucs4 = be16_to_cpu (start_code[i]) + j;
|
||||
goto found;
|
||||
if (range_size > 0)
|
||||
for (j = 0; j < range_size; j++) {
|
||||
if (glyph_ids[j] == g_id_be) {
|
||||
*ucs4 = be16_to_cpu (start_code[i]) + j;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue