diff options
| author | default <nobody@localhost> | 2022-10-16 19:58:59 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2022-10-16 19:58:59 +0200 |
| commit | 01ffb92e5ef90743b02d3ea1062719406373c6d8 (patch) | |
| tree | 8eab28017fe1985984a9ea369d6f974f4327f9e8 /xs_io.h | |
| parent | 395f80bdc40115087e8e4eb8fdbed8520df54863 (diff) | |
Backport from xs.
Diffstat (limited to 'xs_io.h')
| -rw-r--r-- | xs_io.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -84,6 +84,10 @@ d_char *xs_read(FILE *f, int *sz) size -= r; } + /* null terminate, just in case it's treated as a string */ + s = xs_realloc(s, rdsz + 1); + s[rdsz] = '\0'; + *sz = rdsz; return s; |