add type checking

This commit is contained in:
Roman Fomin 2025-01-29 21:14:34 +07:00
parent a4f5382ec9
commit c3c3bcb7dc

View File

@ -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;
}