Skip to content

Commit

Permalink
Merge pull request xbmc#25888 from CastagnaIT/missing_eof_return
Browse files Browse the repository at this point in the history
[FileSystem] Return false when buffer is EOF
  • Loading branch information
CastagnaIT authored Oct 29, 2024
2 parents 040d999 + a4235b8 commit 149821a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/filesystem/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,9 @@ bool XFILE::CFile::ReadString(std::vector<char>& line)
using traits = CFileStreamBuffer::traits_type;
CFileStreamBuffer::int_type aByte = m_pBuffer->sgetc();

if (aByte == traits::eof())
return false;

while (aByte != traits::eof())
{
aByte = m_pBuffer->sbumpc();
Expand Down

0 comments on commit 149821a

Please sign in to comment.