From: Pasi Kallinen Date: Sat, 22 Jan 2022 19:15:44 +0000 (+0200) Subject: Fix vision if xchar is defined larger than char X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b542e3cabf5bd8787f57b2d8a6d98b5afe36be4;p=nethack Fix vision if xchar is defined larger than char --- diff --git a/src/vision.c b/src/vision.c index 871c4868c..f819ecde6 100644 --- a/src/vision.c +++ b/src/vision.c @@ -255,7 +255,7 @@ get_unused_cs(xchar ***rows, xchar **rmin, xchar **rmax) nrmin = *rmin; nrmax = *rmax; - (void) memset((genericptr_t) **rows, 0, ROWNO * COLNO); /* see nothing */ + (void) memset((genericptr_t) **rows, 0, sizeof(xchar) * (ROWNO * COLNO)); /* see nothing */ for (row = 0; row < ROWNO; row++) { /* set row min & max */ *nrmin++ = COLNO - 1; *nrmax++ = 1;