fix peeking
This commit is contained in:
parent
6dbff67bee
commit
ca2b771d27
@ -362,9 +362,9 @@ static EDErrorCode ed_journal_file_read_last_(EDJournalFile *self)
|
||||
|
||||
while (TRUE) {
|
||||
/* arbitrary */
|
||||
pos = end - 100;
|
||||
pos = (pos - 100);
|
||||
if (pos <= 0) {
|
||||
break;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
if (!g_seekable_seek(G_SEEKABLE(stream), pos, G_SEEK_SET,
|
||||
@ -398,7 +398,11 @@ static EDErrorCode ed_journal_file_read_last_(EDJournalFile *self)
|
||||
} while (TRUE);
|
||||
|
||||
if (last == NULL) {
|
||||
if (pos <= 0) {
|
||||
goto done;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
entry = ed_journal_entry_new_parse(last, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user