Fix wrong error message count in QDBusError

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>
bb10
Peter Kümmel 2012-12-01 11:32:50 +01:00 committed by The Qt Project
parent 43ee10518a
commit 62fc970568
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{