Skip to content

Commit

Permalink
Reject invalid values for scaleFactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
virokannas committed Dec 11, 2023
1 parent 58d1ab7 commit 47d5b56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/MaterialXGraphEditor/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ int main(int argc, char* const argv[])
else if (token == "--scaleFactor")
{
parseToken(nextToken, "float", scaleFactor);
if (scaleFactor <= 0.0) {
std::cout << "Scale factor must be a positive, non-zero value. Ignoring the supplied value." << std::endl;
scaleFactor = 0.0;
}
}
else if (token == "--help")
{
Expand Down

0 comments on commit 47d5b56

Please sign in to comment.