From: David Lawrence Ramsey Date: Sun, 12 Jun 2005 15:19:11 +0000 (+0000) Subject: in resize_variables(), use sizeof(char) in the memset() that initializes X-Git-Tag: v1.3.8~177 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c00f6580267374c290b78b24a4dcaa20a6afb64e;p=nano.git in resize_variables(), use sizeof(char) in the memset() that initializes hblank instead of assuming that the size of a char is 1 git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 2eff8b04..50dcfd63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -118,6 +118,9 @@ CVS code - written, so as to not duplicate a translated string. (DLR) - If the current filestruct's been partitioned, unpartition it before saving the associated file. (DLR) + resize_variables() + - Use sizeof(char) in the memset() that initializes hblank + instead of assuming that the size of a char is 1. (DLR) copy_filestruct() - Rename variable prev to copy to avoid confusion. (DLR) print1opt_full() diff --git a/src/nano.c b/src/nano.c index 322cae00..f7fdb894 100644 --- a/src/nano.c +++ b/src/nano.c @@ -212,7 +212,7 @@ void resize_variables(void) #endif hblank = charealloc(hblank, COLS + 1); - memset(hblank, ' ', COLS); + memset(hblank, ' ', COLS * sizeof(char)); hblank[COLS] = '\0'; }