Fix of --scale-to-fit not accepting any input as valid (#5772)

Fixed parsing of Point3, fortunately Point3 was used at just a single
command line parameter, thus this was not a big deal.
This commit is contained in:
Vojtech Bubnik 2021-01-14 12:51:28 +01:00
parent 293f85b6cf
commit 48877614e2

View file

@ -1163,8 +1163,8 @@ public:
{
UNUSED(append);
char dummy;
return sscanf(str.data(), " %lf , %lf , %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 2 ||
sscanf(str.data(), " %lf x %lf x %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 2;
return sscanf(str.data(), " %lf , %lf , %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 3 ||
sscanf(str.data(), " %lf x %lf x %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 3;
}
private: