From 4f6c04c428806dd9c8bebff25c9188f09124f33c Mon Sep 17 00:00:00 2001 From: Lorenz Pullwitt <68168097+lopul@users.noreply.github.com> Date: Sun, 25 Apr 2021 17:10:13 +0200 Subject: [PATCH] Add files via upload --- memorysurfer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/memorysurfer.c b/memorysurfer.c index 3eae4dd..3fb9e40 100644 --- a/memorysurfer.c +++ b/memorysurfer.c @@ -3062,7 +3062,7 @@ static int gen_html(struct WebMemorySurfer *wms) { "\t\t\t\t

\n", a_str != NULL ? "" : " disabled", wms->html_lp, - (wms->ms.card_l[wms->ms.card_i].card_state & 0x08) != 0 ? " checked" : ""); + wms->ms.card_i >= 0 && wms->ms.card_a > 0 && wms->ms.card_i < wms->ms.card_a && (wms->ms.card_l[wms->ms.card_i].card_state & 0x08) != 0 ? " checked" : ""); e = rv < 0; if (e == 0) { imf_info_swaps(&wms->ms.imf); @@ -3195,7 +3195,7 @@ static int gen_html(struct WebMemorySurfer *wms) { sw_info_str); break; case B_ABOUT: - rv = printf("\t\t\t

About MemorySurfer v1.0.1.56

\n" + rv = printf("\t\t\t

About MemorySurfer v1.0.1.57

\n" "\t\t\t

Author: Lorenz Pullwitt

\n" "\t\t\t

Copyright 2016-2021

\n" "\t\t\t

Send bugs and suggestions to\n" @@ -4992,7 +4992,7 @@ int main(int argc, char *argv[]) } break; case A_UPDATE_HTML: - if (((wms->ms.card_l[wms->ms.card_i].card_state & 0x08) != 0) != (wms->ms.is_html > 0)) { + if (wms->ms.card_i >= 0 && (((wms->ms.card_l[wms->ms.card_i].card_state & 0x08) != 0) != (wms->ms.is_html > 0))) { wms->ms.card_l[wms->ms.card_i].card_state = (wms->ms.card_l[wms->ms.card_i].card_state & 0x07) | (wms->ms.is_html > 0) << 3; data_size = wms->ms.card_a * sizeof(struct Card); index = wms->ms.cat_t[wms->ms.cat_i].cat_cli;