utils: read_from_stdin: avoid reading nuls
We should read the actual written size, not the allocated size.
This commit is contained in:
@ -190,7 +190,7 @@ Mu::read_from_stdin()
|
|||||||
return Ok(std::string{
|
return Ok(std::string{
|
||||||
static_cast<const char*>(g_memory_output_stream_get_data(
|
static_cast<const char*>(g_memory_output_stream_get_data(
|
||||||
G_MEMORY_OUTPUT_STREAM(outmem))),
|
G_MEMORY_OUTPUT_STREAM(outmem))),
|
||||||
g_memory_output_stream_get_size(G_MEMORY_OUTPUT_STREAM(outmem))});
|
g_memory_output_stream_get_data_size(G_MEMORY_OUTPUT_STREAM(outmem))});
|
||||||
}
|
}
|
||||||
/* LCOV_EXCL_STOP*/
|
/* LCOV_EXCL_STOP*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user