changeset 2483:48ab1e3e5df5

Fix Linux font selection regression
author Michael Pavone <pavone@retrodev.com>
date Sun, 31 Mar 2024 10:21:34 -0700
parents fb8f49b0aece
children ccee8dccd9cc
files nuklear_ui/font.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nuklear_ui/font.c	Sat Mar 30 21:10:20 2024 -0700
+++ b/nuklear_ui/font.c	Sun Mar 31 10:21:34 2024 -0700
@@ -23,7 +23,7 @@
 	if (!fc_pipe) {
 		return NULL;
 	}
-	size_t buf_size = 4096;
+	size_t buf_size = 2048;
 	char *buffer = NULL;
 	size_t total = 0, read = 0;
 	do {
@@ -33,7 +33,7 @@
 		if (!buffer) {
 			return NULL;
 		}
-		read = fread(buffer, 1, buf_size - total, fc_pipe);
+		read = fread(buffer + total, 1, buf_size - total, fc_pipe);
 	} while (read == (buf_size - total));
 	total += read;
 	buffer[total] = 0;