Fix tautological compare in error checking
size is size_t, so it's never less than zero. Fixes: QTBUG-72286 Change-Id: Idd0c85a4e7b64f9c9c7dfffd156d404d0de5ed8d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
d1cafa3eba
commit
2c6ec2c653
@ -179,7 +179,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
|
||||
#else
|
||||
QString s;
|
||||
size_t size = mbstowcs(NULL, mb, length);
|
||||
if (size < 0) {
|
||||
if (size == size_t(-1)) {
|
||||
Q_ASSERT("Error in CE TextCodec");
|
||||
return QString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user