summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-04-10 14:53:42 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-11 01:42:12 +0200
commit8e74b5cfe43893522c0f06d0b0d0dd5b7393aa6f (patch)
tree4ff583a1857f263f6f8edabbbb1de3d897e84492 /src
parentd7851bbc587b01a3900a8e52b1659f3054f6c3d0 (diff)
fix digitValue() returned 0 instead of -1 for invalid ucs4 characters
Task-number: QTBUG-20318 Change-Id: I96c4c2b042bad478b7c704669e7ea0d574d3b22f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qchar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 6efd9f20af..1ce19ec911 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -717,7 +717,7 @@ int QChar::digitValue(ushort ucs2)
int QChar::digitValue(uint ucs4)
{
if (ucs4 > UNICODE_LAST_CODEPOINT)
- return 0;
+ return -1;
return qGetProp(ucs4)->digitValue;
}