2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-05 13:13:27 +00:00
This commit is contained in:
Jack Andersen 2015-05-25 18:42:56 -10:00
commit 0349e2cea0

View File

@ -23,7 +23,11 @@ size_t CBlenderConnection::_readLine(char* buf, size_t bufSz)
while (true)
{
if (readBytes >= bufSz)
{
throw std::length_error("Pipe buffer overrun");
*(buf-1) = '\0';
return bufSz - 1;
}
ssize_t ret = read(m_readpipe[0], buf, 1);
if (ret < 0)
goto err;