From c3c3bcb7dc2e605951c5df78523d0f1b081760eb Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 29 Jan 2025 21:14:34 +0700 Subject: [PATCH] add type checking --- src/mn_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mn_setup.c b/src/mn_setup.c index 4c6186a8..3702e757 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -3537,11 +3537,11 @@ static void ResetDefaults(ss_types reset_screen) { warn |= flags & (S_LEVWARN | S_PRGWARN); } - else if (dp->current.s) + else if (dp->type == string && dp->current.s) { *dp->current.s = *dp->location.s; } - else if (dp->current.i) + else if (dp->type == number && dp->current.i) { *dp->current.i = *dp->location.i; }