Fix typos in memory macros.
FT_QNEW_ARRAY and FT_QRENEW_ARRAY were using the non-Q FT_MEM_NEW_ARRAY and FT_MEM_RENEW_ARRAY. Change these to use the Q versions. Also fix the one issue discovered in tt_face_load_name where table->names is created with FT_QNEW_ARRAY but the extra string member is not initialized to NULL. * include/freetype/internal/ftmemory.h (FT_Q(RE)NEW_ARRAY): Use FT_MEM_Q(RE)NEW_ARRAY as needed. * src/sfnt/ttload.c (tt_face_load_name): Initialize `entry->string`.
This commit is contained in:
parent
8406ae5324
commit
c71eb22dde
|
@ -344,14 +344,13 @@ extern "C++"
|
||||||
#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \
|
#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \
|
||||||
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
|
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
|
||||||
|
|
||||||
#define FT_QNEW( ptr ) \
|
#define FT_QNEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
|
||||||
FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
|
|
||||||
|
|
||||||
#define FT_QNEW_ARRAY( ptr, count ) \
|
#define FT_QNEW_ARRAY( ptr, count ) \
|
||||||
FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
|
FT_MEM_SET_ERROR( FT_MEM_QNEW_ARRAY( ptr, count ) )
|
||||||
|
|
||||||
#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \
|
#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \
|
||||||
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
|
FT_MEM_SET_ERROR( FT_MEM_QRENEW_ARRAY( ptr, curcnt, newcnt ) )
|
||||||
|
|
||||||
|
|
||||||
FT_BASE( FT_Pointer )
|
FT_BASE( FT_Pointer )
|
||||||
|
|
|
@ -988,6 +988,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* mark the string as not yet converted */
|
||||||
|
entry->string = NULL;
|
||||||
|
|
||||||
entry++;
|
entry++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue