]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Named Pipe unicode length calculation fix.
authorToni Wilen <twilen@winuae.net>
Mon, 26 Oct 2015 16:47:29 +0000 (18:47 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 26 Oct 2015 16:47:29 +0000 (18:47 +0200)
uaeipc.cpp

index fca20c7c5d982a6cff6a6d09501ffc30f48dffa1..faeec5ce45c87a6239e2eef1583a4da882b9a6b0 100644 (file)
@@ -344,7 +344,7 @@ int checkIPC (void *vipc, struct uae_prefs *p)
                        if (_tcslen (out) >= IPC_BUFFER_SIZE)
                                out[IPC_BUFFER_SIZE - 1] = 0;
                        _tcscpy ((TCHAR*)ipc->outbuf, out);
-                       outlen = _tcsclen ((TCHAR*)ipc->outbuf) + sizeof (TCHAR);
+                       outlen = (_tcsclen ((TCHAR*)ipc->outbuf) + 1) * sizeof (TCHAR);
                } else {
                        ua_copy ((uae_char*)ipc->outbuf, sizeof ipc->outbuf, out);
                        outlen = strlen ((char*)ipc->outbuf) + sizeof (char);