From d87f2565f1e45904109f677c64a9ed253b26791a Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Sat, 11 Jan 2020 09:36:47 -0500 Subject: [PATCH] How'd this happen...? --- src/command.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/command.c b/src/command.c index 77f1d71b9..2893106dd 100644 --- a/src/command.c +++ b/src/command.c @@ -2110,20 +2110,15 @@ void CV_SaveVariables(FILE *f) for (cvar = consvar_vars; cvar; cvar = cvar->next) if (cvar->flags & CV_SAVE) { - char stringtrite[MAXTEXTCMD+1]; + char stringtowrite[MAXTEXTCMD+1]; // Silly hack for Min/Max vars if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN")) - { - if (cvar->flags & CV_FLOAT) - sprintf(stringtowrite, "%f", FIXED_TO_FLOAT(cvar->value)); - else - sprintf(stringtowrite, "%d", cvar->value); - } + sprintf(stringtowrite, "%d", cvar->value); else - strcpy(stringtrite, cvar->string); + strcpy(stringtowrite, cvar->string); - fprintf(f, "%s \"%s\"\n", cvar->name, stringtrite); + fprintf(f, "%s \"%s\"\n", cvar->name, stringtowrite); } }