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();
|
||||
|
||||
bool validData = NBT::validateRawNBTData(data, fileSize);
|
||||
if (validData) {
|
||||
bool isValidData = NBT::validateRawNBTData(data, fileSize);
|
||||
if (isValidData) {
|
||||
std::cerr << "Valid data." << std::endl;
|
||||
} else {
|
||||
std::cerr << "Invalid data." << std::endl;
|
||||
return EXIT_RUNTIME;
|
||||
}
|
||||
|
||||
//TODO: print things here
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue