]> git.wh0rd.org Git - nano.git/commitdiff
Changed null out at end of matchBuf from NULL to 0
authorChris Allegretta <chrisa@asty.org>
Tue, 16 Jan 2001 04:20:08 +0000 (04:20 +0000)
committerChris Allegretta <chrisa@asty.org>
Tue, 16 Jan 2001 04:20:08 +0000 (04:20 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@483 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
files.c

index ffdd06f871fc1e23ea41f40dfea1f974cfbb4f4f..d8e010c62081834abcedc0bd4f91980d2f379755 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,7 +28,7 @@ General
        - Added space and - keys to do page up and down.
   cwd_tab_completion(), input_tab()
        - Changed bare malloc/calloc calls to nmalloc (found by Rocco).
-       - Added null end of tmpBuf for sanity (Rocco).
+       - Added zero end of tmpBuf for sanity (Rocco).
 - nano.c:
   ABCD()
        - New function, figures out what kbinput to return given
diff --git a/files.c b/files.c
index 8248f498c134cb69feac7cea9dec66e77c9e1f7e..6b5a9d2b463911cab68c13360c8bea27e1f69b87 100644 (file)
--- a/files.c
+++ b/files.c
@@ -885,7 +885,7 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace)
        matchBuf = (char *) nmalloc((strlen(buf) + 2) * sizeof(char));
 
        strncpy(matchBuf, buf, place);
-       matchBuf[place] = (char) NULL;
+       matchBuf[place] = 0;
        tmp = matchBuf;
 
        /* skip any leading white space */