mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Fixes
This commit is contained in:
parent
0ec7f3348e
commit
47e24cb468
3 changed files with 11 additions and 11 deletions
|
|
@ -227,13 +227,13 @@ void WorldFiles::writeWorldInfo(const WorldInfo& info) {
|
|||
|
||||
bool WorldFiles::readWorldInfo(WorldInfo& info) {
|
||||
size_t length = 0;
|
||||
ubyte* data = (ubyte*)files::read_bytes(getPlayerFile(), length);
|
||||
ubyte* data = (ubyte*)files::read_bytes(getWorldFile(), length);
|
||||
if (data == nullptr){
|
||||
std::cerr << "could not to read world.bin (ignored)" << std::endl;
|
||||
return false;
|
||||
}
|
||||
BinaryReader inp(data, length);
|
||||
inp.checkMagic(WORLD_FORMAT_MAGIC, length);
|
||||
inp.checkMagic(WORLD_FORMAT_MAGIC, 8);
|
||||
/*ubyte version = */inp.get();
|
||||
while (inp.hasNext()) {
|
||||
ubyte section = inp.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue