mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-30 13:44:06 +08:00
util/fossilize_db: Reset file position to parsed_offset on cache_offset read failure.
Otherwise we might restart reading from the middle of the entry.
Fixes: 2ec1bff0f3
"util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>
This commit is contained in:
parent
3c51a3aa95
commit
57ca07455c
@ -157,7 +157,7 @@ update_foz_index(struct foz_db *foz_db, FILE *db_idx, unsigned file_idx)
|
||||
uint64_t cache_offset;
|
||||
if (fread(&cache_offset, 1, sizeof(cache_offset), db_idx) !=
|
||||
sizeof(cache_offset))
|
||||
return;
|
||||
break;
|
||||
|
||||
entry->offset = cache_offset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user