Corrected error code

Co-authored-by: nulano <nulano@nulano.eu>
This commit is contained in:
Andrew Murray 2023-06-14 08:55:21 +10:00
parent 8f3ccff8f2
commit 538971532d

View File

@ -189,7 +189,7 @@ getfont(PyObject *self_, PyObject *args, PyObject *kw) {
/* Don't free this before FT_Done_Face */
self->font_bytes = PyMem_Malloc(font_bytes_size);
if (!self->font_bytes) {
error = 65; // Out of Memory in Freetype.
error = FT_Err_Out_Of_Memory;
}
if (!error) {
memcpy(self->font_bytes, font_bytes, (size_t)font_bytes_size);