tools/dumpnbt: better variable name and exit when data is invalid

Soda
BodgeMaster 2022-08-29 21:02:36 +02:00
parent ee5048331c
commit b4d4ce77b2
1 changed files with 5 additions and 2 deletions

View File

@ -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;
} }