From ff486ee0d4fbd0ea72854c743b42bc9b1f8293a1 Mon Sep 17 00:00:00 2001 From: Jorj Bauer Date: Thu, 2 Jul 2020 22:00:12 -0400 Subject: [PATCH] prefs should use MAXPATH --- prefsstore.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/prefsstore.h b/prefsstore.h index fc8450c..45f0817 100644 --- a/prefsstore.h +++ b/prefsstore.h @@ -8,6 +8,10 @@ #define PREFSMAGIC 0x01831093 #define PREFSVERSION 1 +#ifndef MAXPATH +#define MAXPATH 255 +#endif + // The Teensy 3.6 has 4096 bytes of flash. We want this to stay under // that size. typedef struct _prefs { @@ -21,12 +25,12 @@ typedef struct _prefs { uint8_t priorityMode; uint8_t speed; - char reserved[255]; // 255 is the Teensy MAXPATH size + char reserved[MAXPATH]; // 255 is the Teensy MAXPATH size - char disk1[255]; - char disk2[255]; - char hd1[255]; - char hd2[255]; + char disk1[MAXPATH]; + char disk2[MAXPATH]; + char hd1[MAXPATH]; + char hd2[MAXPATH]; } prefs_t; class PrefsStore {