From 94665b2f421a64e967b3bfd1e3685cd0f253a3e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Wed, 7 Feb 2024 13:45:09 -0500
Subject: [PATCH] Fix up reading of Turbo Pascal arrays.

The last element of these arrays was getting clobbered by the next
field because the array sizes are stored in the first element.

Fixes warning on NetBSD and Raspian.
---
 src/syncdraw/fonts.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/syncdraw/fonts.h b/src/syncdraw/fonts.h
index 0a7d23c3ab..5d297e3352 100644
--- a/src/syncdraw/fonts.h
+++ b/src/syncdraw/fonts.h
@@ -16,13 +16,13 @@ typedef struct {
 
 typedef struct {
 	char            Sign[20];
-	char            a[3];
-	char            Name[16];
+	char            a[4];		// This is a Turbo Pascal array, length is in first element, can hold 3 values
+	char            Name[17];	// Another TP array (16)
 	unsigned char   FontType;
 	unsigned char   Spaces;
 	short           Nul;
-	unsigned short  Chartable[95];
-	char            b[20];
+	unsigned short  Chartable[96];  // Another TP array (95)
+	char            b[21];          // Another TP array (20)
 }               TheDrawFont;
 
 extern MysticDrawFontHeader Header;
-- 
GitLab