Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.2
-
None
-
None
-
2cc7a785eff228f414faa09ff882c2f0a2092cfd
Description
corelib\kernel\qfunctions_wince.cpp
see my comment below:
void *qt_wince_bsearch(const void *key, const void *base, size_t num, size_t size, int (__cdecl *compare)(const void *, const void *)) { size_t low = 0; size_t high = num - 1; while (low <= high) { unsigned int mid = ((unsigned) (low + high)) >> 1; int c = compare(key, (char*)base + mid * size); if (c < 0) high = mid - 1; // <-- high is an unsigned value, so if mid == 0 then high == 0xffffffff , and condition low <= high is not satisfied else if (c > 0) low = mid + 1; else return (char*) base + mid * size; } return (NULL); }