Fix issues spotted by PVS-Studio and SonarCloud

This commit is contained in:
Nikolaj Schlej 2022-09-10 14:20:49 +02:00
parent 75a1374c0c
commit 22d1db8c7f
2 changed files with 4 additions and 2 deletions

View file

@ -1539,7 +1539,7 @@ std::istream& operator >> (std::istream& sin, CBString& b) {
do {
b.gets ((bNgetc) istreamGets, &sin, '\n');
if (b.slen > 0 && b.data[b.slen-1] == '\n') b.slen--;
} while (b.slen == 0 && !sin.eof ());
} while (b.slen == 0 && !sin.eof() && !sin.fail());
return sin;
}