13
0

Windows process: allow for binary data output

Do not rely on null termination.
This commit is contained in:
Robin Gareus 2023-01-04 20:27:00 +01:00
parent bb4394b8a5
commit 3da7f71fb6
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -547,7 +547,8 @@ SystemExec::output_interposer()
}
if (bytesRead < 1) continue; /* actually not needed; but this is safe. */
data[bytesRead] = 0;
ReadStdout(data, bytesRead); /* EMIT SIGNAL */
std::string rv = std::string (data, bytesRead);
ReadStdout(rv, bytesRead); /* EMIT SIGNAL */
}
Terminated(); /* EMIT SIGNAL */
pthread_exit(0);