1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-06-09 19:20:43 +00:00

Bug fix: preincrement index when storing EILSEQ_REPL

This commit is contained in:
John Zaitseff 2018-08-24 10:45:31 +10:00
parent 8f9072ecfb
commit 74218edb89

View File

@ -1120,7 +1120,7 @@ size_t xwcrtomb (char *restrict dest, wchar_t wc, mbstate_t *restrict mbstate)
errno_exit(_("xwcrtomb: NUL"));
}
dest[n] = EILSEQ_REPL;
dest[n++] = '\0';
dest[++n] = '\0';
} else {
errno_exit(_("xwcrtomb: '%lc'"), (wint_t) wc);
}