Global: Cleanup some type/range checks.

This commit is contained in:
Unknown W. Brackets committed 2022-12-10 21:13:37 -08:00
1 parent 9cfcbc46e6
commit 1810692236
5 files changed
+11 -9

No files matched your search

+3 -1
View File
@@ -67,7 +67,9 @@ int Buffer::TakeLineCRLF(std::string *dest) {
if (after_next_line < 0) {
return after_next_line;
} else {
Take(after_next_line - 2, dest);
_dbg_assert_(after_next_line >= 2);
if (after_next_line != 2)
Take((size_t)after_next_line - 2, dest);
Skip(2); // Skip the CRLF
return after_next_line - 2;
}