Mercurial > hg > RemoteEditor > vim7
changeset 21:cc45fc3d7c4a
*** empty log message ***
author | kono |
---|---|
date | Tue, 09 Sep 2008 15:58:01 +0900 |
parents | 5896e8fc8c7f |
children | 09b6b4285677 |
files | src/reditor.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/reditor.c Tue Sep 09 15:29:36 2008 +0900 +++ b/src/reditor.c Tue Sep 09 15:58:01 2008 +0900 @@ -1162,7 +1162,7 @@ textsize = get_header(header, REP_T_SIZE_OFFSET); if (textsize > 0) { - if ((text = (char*)rep_alloc(textsize)) == NULL) { + if ((text = (char*)rep_alloc(textsize)+1) == NULL) { return(FALSE); } /* read text part */ @@ -1171,6 +1171,7 @@ rep_free(text); return(FALSE); } + text[textsize] = 0; } if (cmd == REP_INSERT_CMD ||