mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
correct qstricmp() return value checks in QTextStreamPrivate::getReal()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e56ced7f75
commit
7cbc1b83ef
1 changed files with 3 additions and 3 deletions
|
@ -1856,13 +1856,13 @@ bool QTextStreamPrivate::getReal(double *f)
|
|||
// for some reason. QLocale only checks for lower-case
|
||||
// nan/+inf/-inf, so here we also check for uppercase and mixed
|
||||
// case versions.
|
||||
if (!qstricmp(buf, "nan") || !qstricmp(buf, "+nan") || !qstricmp(buf, "-nan")) {
|
||||
if (qstricmp(buf, "nan") == 0 || qstricmp(buf, "+nan") == 0 || qstricmp(buf, "-nan") == 0) {
|
||||
*f = qSNaN();
|
||||
return true;
|
||||
} else if (!qstricmp(buf, "+inf") || !qstricmp(buf, "inf")) {
|
||||
} else if (qstricmp(buf, "+inf") == 0 || qstricmp(buf, "inf") == 0) {
|
||||
*f = qInf();
|
||||
return true;
|
||||
} else if (!qstricmp(buf, "-inf")) {
|
||||
} else if (qstricmp(buf, "-inf") == 0) {
|
||||
*f = -qInf();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue