Backed off snprintf() to sprintf() because Turbo C doesn't do the former.
authorDavid Griffith <dave@661.org>
Fri, 26 May 2023 02:41:55 +0000 (19:41 -0700)
committerDavid Griffith <dave@661.org>
Fri, 26 May 2023 02:50:48 +0000 (19:50 -0700)
There is no way for this vary the inputs to sprintf() here.

src/common/fastmem.c

index fbc5cb4cc0a336d0a6c619409ce4887d39d8084b..2dac9de13eb176bad33bd93a2bdf7bbbfa123561 100644 (file)
@@ -289,7 +289,7 @@ void init_memory(void)
        zword addr;
        unsigned n;
        int i, j;
-       char errorstring[81];
+       char errorstring[26]; /* Don't reuse this. */
 
 #ifdef TOPS20
        zword checksum = 0;
@@ -461,7 +461,7 @@ void init_memory(void)
 
        /* Ensure undo slots don't exceed maximum */
        if (f_setup.undo_slots > MAX_UNDO_SLOTS) {
-               snprintf(errorstring, 80, "Maxmimum undo slots is %d", MAX_UNDO_SLOTS);
+               sprintf(errorstring, "Maximum undo slots is %d", MAX_UNDO_SLOTS);
                os_fatal(errorstring);
        }