Mercurial > hg > dmlib
changeset 1883:08b0cbadbc45
Fix dmfputs(), it was writing the end NUL byte of given string.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 25 Jun 2018 13:22:39 +0300 |
parents | 8e3ebeabb2d9 |
children | 47fe47f01fea |
files | src/dmres.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dmres.c Mon Jun 25 13:22:17 2018 +0300 +++ b/src/dmres.c Mon Jun 25 13:22:39 2018 +0300 @@ -974,7 +974,7 @@ int dmfputs(const char *str, DMResource *fh) { - return dmfwrite(str, strlen(str) + 1, 1, fh) == 1 ? 1 : EOF; + return dmfwrite(str, strlen(str), 1, fh) == 1 ? 1 : EOF; } int dmResourceRef(DMResource *node)