tools/dumpnbt: better variable name and exit when data is invalid
parent
ee5048331c
commit
b4d4ce77b2
|
@ -86,12 +86,15 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
fileStream.close();
|
fileStream.close();
|
||||||
|
|
||||||
bool validData = NBT::validateRawNBTData(data, fileSize);
|
bool isValidData = NBT::validateRawNBTData(data, fileSize);
|
||||||
if (validData) {
|
if (isValidData) {
|
||||||
std::cerr << "Valid data." << std::endl;
|
std::cerr << "Valid data." << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Invalid data." << std::endl;
|
std::cerr << "Invalid data." << std::endl;
|
||||||
|
return EXIT_RUNTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: print things here
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue