fixed cursor destruction on getLineNumberAtCursor() method to ZString.

This commit is contained in:
Brad Arant 2024-11-26 09:48:56 -08:00
parent 52d3985ffa
commit ab4da04de6

View File

@ -576,9 +576,10 @@ namespace coreutils {
}
int ZString::getLineNumberAtCursor() {
char *temp = cursor;
int line = 1;
while(cursor != data)
if(*cursor-- == '\n')
while(temp != data)
if(*temp-- == '\n')
++line;
return line;
}