version 5.2.1

fix potentially errors in PIConstChars compare methods
PIHIDevice::open() for open last device
PIVariant::toPoint() now can cast from PIMathVectord
This commit is contained in:
2025-09-13 17:25:12 +03:00
parent 3c72db2de8
commit dcdd7db33d
5 changed files with 33 additions and 10 deletions

View File

@@ -196,7 +196,7 @@ public:
if (isNull() && s.isNull()) return true;
if (isNull() xor s.isNull()) return false;
if (size() != s.size()) return false;
return strcmp(str, s.str) == 0;
return strncmp(str, s.str, size()) == 0;
}
//! \~english Compare operator.
@@ -209,7 +209,7 @@ public:
if (isNull() && s.isNull()) return false;
if (isNull() && !s.isNull()) return true;
if (!isNull() && s.isNull()) return false;
if (size() == s.size()) return strcmp(str, s.str) < 0;
if (size() == s.size()) return strncmp(str, s.str, size()) < 0;
return size() < s.size();
}
@@ -219,7 +219,7 @@ public:
if (isNull() && s.isNull()) return false;
if (isNull() && !s.isNull()) return false;
if (!isNull() && s.isNull()) return true;
if (size() == s.size()) return strcmp(str, s.str) > 0;
if (size() == s.size()) return strncmp(str, s.str, size()) > 0;
return size() > s.size();
}