Mercurial > hg > octave-avbm
diff src/load-save.cc @ 2436:a628e881be66
[project @ 1996-10-29 22:08:28 by jwe]
author | jwe |
---|---|
date | Tue, 29 Oct 1996 22:10:39 +0000 |
parents | dd29ab8af9e7 |
children | 902f330e9584 |
line wrap: on
line diff
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -1149,11 +1149,13 @@ } // LEN includes the terminating character, and the file is also - // supposed to include it. + // supposed to include it, but apparently not all files do. Either + // way, I think this should work. - name = new char [len]; + name = new char [len+1]; if (! is.read (name, len)) goto data_read_error; + name[len] = '\0'; dlen = nr * nc; if (dlen < 0)