diff --git a/src/engine/shared/fifo.cpp b/src/engine/shared/fifo.cpp index 89c1c84e9..bcda96557 100644 --- a/src/engine/shared/fifo.cpp +++ b/src/engine/shared/fifo.cpp @@ -61,9 +61,10 @@ void CFifo::Update() return; char aBuf[8192]; - int Length = read(m_File, aBuf, sizeof(aBuf)); + int Length = read(m_File, aBuf, sizeof(aBuf) - 1); if(Length <= 0) return; + aBuf[Length] = '\0'; char *pCur = aBuf; for(int i = 0; i < Length; ++i)