mirror of https://github.com/cabaletta/baritone
full integrity check
This commit is contained in:
parent
7d6d34c5aa
commit
530f87ad14
|
@ -135,6 +135,7 @@ public final class CachedRegion implements ICachedChunkAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
out.writeInt(~CACHED_REGION_MAGIC);
|
||||||
}
|
}
|
||||||
hasUnsavedChanges = false;
|
hasUnsavedChanges = false;
|
||||||
} catch (IOException ignored) {}
|
} catch (IOException ignored) {}
|
||||||
|
@ -182,6 +183,10 @@ public final class CachedRegion implements ICachedChunkAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int fileEndMagic = in.readInt();
|
||||||
|
if (fileEndMagic != ~magic) {
|
||||||
|
throw new IOException("Bad end of file magic");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hasUnsavedChanges = false;
|
hasUnsavedChanges = false;
|
||||||
} catch (IOException ignored) {}
|
} catch (IOException ignored) {}
|
||||||
|
|
Loading…
Reference in New Issue