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) {
|
while (TRUE) {
|
||||||
/* arbitrary */
|
/* arbitrary */
|
||||||
pos = end - 100;
|
pos = (pos - 100);
|
||||||
if (pos <= 0) {
|
if (pos <= 0) {
|
||||||
break;
|
pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_seekable_seek(G_SEEKABLE(stream), pos, G_SEEK_SET,
|
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);
|
} while (TRUE);
|
||||||
|
|
||||||
if (last == NULL) {
|
if (last == NULL) {
|
||||||
goto done;
|
if (pos <= 0) {
|
||||||
|
goto done;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = ed_journal_entry_new_parse(last, NULL);
|
entry = ed_journal_entry_new_parse(last, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user