full integrity check
This commit is contained in:
@@ -135,6 +135,7 @@ public final class CachedRegion implements ICachedChunkAccess {
|
||||
}
|
||||
}
|
||||
}
|
||||
out.writeInt(~CACHED_REGION_MAGIC);
|
||||
}
|
||||
hasUnsavedChanges = false;
|
||||
} 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;
|
||||
} catch (IOException ignored) {}
|
||||
|
Reference in New Issue
Block a user