Commit c00f6580 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 4 additions and 1 deletion
+4 -1
...@@ -118,6 +118,9 @@ CVS code - ...@@ -118,6 +118,9 @@ CVS code -
written, so as to not duplicate a translated string. (DLR) written, so as to not duplicate a translated string. (DLR)
- If the current filestruct's been partitioned, unpartition it - If the current filestruct's been partitioned, unpartition it
before saving the associated file. (DLR) 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() copy_filestruct()
- Rename variable prev to copy to avoid confusion. (DLR) - Rename variable prev to copy to avoid confusion. (DLR)
print1opt_full() print1opt_full()
......
...@@ -212,7 +212,7 @@ void resize_variables(void) ...@@ -212,7 +212,7 @@ void resize_variables(void)
#endif #endif
hblank = charealloc(hblank, COLS + 1); hblank = charealloc(hblank, COLS + 1);
memset(hblank, ' ', COLS); memset(hblank, ' ', COLS * sizeof(char));
hblank[COLS] = '\0'; hblank[COLS] = '\0';
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment