projects
/
profile
/
ivi
/
qtbase.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43ee105
)
Fix wrong error message count in QDBusError
author
Peter Kümmel
<syntheticpp@gmx.net>
Sat, 1 Dec 2012 10:32:50 +0000
(11:32 +0100)
committer
The Qt Project
<gerrit-noreply@qt-project.org>
Sat, 1 Dec 2012 16:13:43 +0000
(17:13 +0100)
Don't pass the pointer errorMessages_string - 1 to strcmp().
-1 marks the end should not be used for the pointer arithmetic
in get(const char *name)
Change-Id: I5ec239c63f074d104d441511294554f21fd6eccd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/dbus/qdbuserror.cpp
patch
|
blob
|
history
diff --git
a/src/dbus/qdbuserror.cpp
b/src/dbus/qdbuserror.cpp
index
37523c0
..
52370e8
100644
(file)
--- a/
src/dbus/qdbuserror.cpp
+++ b/
src/dbus/qdbuserror.cpp
@@
-142,7
+142,7
@@
static const int errorMessages_indices[] = {
};
static const int errorMessages_count = sizeof errorMessages_indices /
- sizeof errorMessages_indices[0];
+ sizeof errorMessages_indices[0]
- 1
;
static inline const char *get(QDBusError::ErrorType code)
{