Skip to content

Commit da74b03

Browse files
Windows: fix unicode output on incomplete (prompt) lines
1 parent 17a67e6 commit da74b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ Boolean shell_readline(t_shell *x)
672672
// read buffer and set the offset.
673673
offset = (long)strlen(lp2) * charsize;
674674
#ifdef WIN_VERSION
675+
strncpy(line, lp2, MAX_MESSAGELEN); // temp copy
675676
if (x->unicode) {
676677
if (charsize == sizeof(WCHAR)) { // it's really unicode
677678
MultiByteToWideChar(CP_UTF8, 0, lp2, -1, unicodestream, MAX_MESSAGELEN);
@@ -689,7 +690,6 @@ Boolean shell_readline(t_shell *x)
689690
else
690691
#endif
691692
{
692-
strncpy(line, lp2, MAX_MESSAGELEN); // temp copy
693693
strncpy(stream, line, MAX_MESSAGELEN);
694694
}
695695
} else {

0 commit comments

Comments
 (0)