From 8ed6d97446f2f3e5523da62eefbbf32ef7c1290e Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 9 Sep 2023 15:13:55 -0400 Subject: [PATCH] * src/type1/t1afm.c (t1_get_index): Avoid `strlen` call. Instead, we check the terminal zero. --- src/type1/t1afm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index d9b9398b0..219e81a7b 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -69,8 +69,8 @@ if ( gname && gname[0] == name[0] && - ft_strlen( gname ) == len && - ft_strncmp( gname, name, len ) == 0 ) + ft_strncmp( gname, name, len ) == 0 && + gname[len] == 0 ) return n; }