utils: read_from_stdin: avoid reading nuls

We should read the actual written size, not the allocated size.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-14 15:46:18 +03:00
committed by Seth Ladygo
parent 39c8472dba
commit 809b9e4f4a

View File

@ -190,7 +190,7 @@ Mu::read_from_stdin()
return Ok(std::string{
static_cast<const char*>(g_memory_output_stream_get_data(
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*/