ecode: Fix in ProjectSearch.

This commit is contained in:
Martín Lucas Golini
2022-09-19 11:12:20 -03:00
parent aaf9608ea1
commit 2c2d6b03ac
2 changed files with 22 additions and 23 deletions

View File

@@ -28,8 +28,10 @@ static String textLine( const std::string& fileText, const size_t& fromPos, size
if ( stringStartPtr != ptr ) {
while ( stringStartPtr != ptr && *--ptr != '\n' ) {
}
nlStartPtr = ptr + 1;
start = ptr - stringStartPtr + 1;
if ( stringStartPtr != ptr ) {
nlStartPtr = ptr + 1;
start = ptr - stringStartPtr + 1;
}
}
ptr = startPtr;
while ( ++ptr && *ptr != '\0' && *ptr != '\n' ) {