diff libmlk-core/mlk/core/font.c @ 521:338a4436e255

core: doxygenize font
author David Demelier <markand@malikania.fr>
date Sat, 04 Mar 2023 15:39:21 +0100
parents 23559c7ccf47
children c7664b679a95
line wrap: on
line diff
--- a/libmlk-core/mlk/core/font.c	Sat Mar 04 15:10:35 2023 +0100
+++ b/libmlk-core/mlk/core/font.c	Sat Mar 04 15:39:21 2023 +0100
@@ -40,7 +40,10 @@
 }
 
 int
-mlk_font_openmem(struct mlk_font *font, const void *buffer, size_t buflen, unsigned int size)
+mlk_font_openmem(struct mlk_font *font,
+                 const void *buffer,
+                 size_t buflen,
+                 unsigned int size)
 {
 	assert(font);
 	assert(buffer);
@@ -120,8 +123,8 @@
 {
 	assert(font);
 
-	if (font->handle)
+	if (font->handle) {
 		TTF_CloseFont(font->handle);
-
-	memset(font, 0, sizeof (*font));
+		font->handle = NULL;
+	}
 }