x_res, y_res and z_res are now verified to be multiples of 16

This commit is contained in:
CobaltXII
2019-01-01 20:57:28 -05:00
parent 8c3b6bba8c
commit 5cf483d5bf

View File

@@ -232,6 +232,15 @@ int main(int argc, char** argv)
x_res = std::stoi(std::string(argv[3]));
y_res = std::stoi(std::string(argv[4]));
z_res = std::stoi(std::string(argv[5]));
// Make sure that x_res, y_res and z_res are multiples of 16.
if (x_res % 16 != 0 || y_res % 16 != 0 || z_res % 16 != 0)
{
std::cout << "x_res, y_res and z_res must be multiples of 16." << std::endl;
exit(17);
}
}
else
{
@@ -317,6 +326,15 @@ int main(int argc, char** argv)
x_res = std::stoi(std::string(argv[2]));
y_res = std::stoi(std::string(argv[3]));
z_res = std::stoi(std::string(argv[4]));
// Make sure that x_res, y_res and z_res are multiples of 16.
if (x_res % 16 != 0 || y_res % 16 != 0 || z_res % 16 != 0)
{
std::cout << "x_res, y_res and z_res must be multiples of 16." << std::endl;
exit(17);
}
}
else
{