events buffer need not end in NUL

This commit is contained in:
rsc 2006-02-21 20:46:49 +00:00
parent c42a1d3d61
commit 95409400f7
3 changed files with 9 additions and 6 deletions

View file

@ -346,7 +346,7 @@ readfile(char *dir, char *name, int *np)
len = d->length;
free(d);
data = emalloc(len+1);
fsread(fid, data, len);
len = fsreadn(fid, data, len);
fsclose(fid);
if(np != nil)
*np = len;