summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2023-03-17 23:35:10 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2023-03-17 23:35:10 -0400
commit8fc6df1028ba7173fbcc467a4402bb7ef8a84f8f (patch)
treef078e46347d65a4775f7513bdb8f95666cf0d1b8
parentef636696524b081f1b8819eb0c6a0b932d35757d (diff)
downloadfreetype2-8fc6df1028ba7173fbcc467a4402bb7ef8a84f8f.tar.gz
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use for-loop.
Even though we never call `TT_Load_Simple_Glyph` with zero contours, out of abundance of precaution, let's handle this case properly.
-rw-r--r--src/truetype/ttgload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 4defa8792..534026a7c 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -388,7 +388,7 @@
cont_limit = cont + n_contours;
last = -1;
- do
+ for ( ; cont < cont_limit; cont++ )
{
*cont = FT_NEXT_SHORT( p );
@@ -396,7 +396,7 @@
goto Invalid_Outline;
last = *cont;
- } while ( ++cont < cont_limit );
+ }
n_points = last + 1;