Find in folder excerpt would be one byte too short for last line

Since it was one byte it would throw an exception if the last character on the line was a multi-byte sequence (as we’d create an NSString with malformed/truncated UTF-8).
This commit is contained in:
Allan Odgaard
2015-01-21 15:38:33 +07:00
parent 71f7c50aea
commit a1a8205467

View File

@@ -240,7 +240,7 @@ namespace find
size_t eol = it.to;
if(bol != eol)
{
while(eol+1 < text.size() && linefeed_length(text, eol) == 0)
while(eol < text.size() && linefeed_length(text, eol) == 0)
++eol;
}