summaryrefslogtreecommitdiff
path: root/xs_io.h
diff options
context:
space:
mode:
authorGravatar default2022-10-16 19:58:59 +0200
committerGravatar default2022-10-16 19:58:59 +0200
commit01ffb92e5ef90743b02d3ea1062719406373c6d8 (patch)
tree8eab28017fe1985984a9ea369d6f974f4327f9e8 /xs_io.h
parentAdded support for HEAD methods. (diff)
downloadsnac2-01ffb92e5ef90743b02d3ea1062719406373c6d8.tar.gz
snac2-01ffb92e5ef90743b02d3ea1062719406373c6d8.tar.xz
snac2-01ffb92e5ef90743b02d3ea1062719406373c6d8.zip
Backport from xs.
Diffstat (limited to 'xs_io.h')
-rw-r--r--xs_io.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xs_io.h b/xs_io.h
index ca243ad..1379a34 100644
--- a/xs_io.h
+++ b/xs_io.h
@@ -84,6 +84,10 @@ d_char *xs_read(FILE *f, int *sz)
84 size -= r; 84 size -= r;
85 } 85 }
86 86
87 /* null terminate, just in case it's treated as a string */
88 s = xs_realloc(s, rdsz + 1);
89 s[rdsz] = '\0';
90
87 *sz = rdsz; 91 *sz = rdsz;
88 92
89 return s; 93 return s;