
talanchor at mail
Aug 6, 2013, 7:25 AM
Post #1 of 2
(26 views)
Permalink
|
|
search-sets: incorrect range
|
|
dbmail fails to pass last of search-sets' test: ok uid search uid $uidnext:4294967295 because left and right values of the input range are incorrectly reassigned: if (l == 0xffffffff) l = hi; // outlook ... if (r == 0xffffffff) r = hi; // outlook ... if (r > hi) r = hi; if (r < lo) r = lo; So, for example, if hi == 1601 and we execute following search: ok uid search uid 1602:4294967295 then we get l == 1602 and r == 1601, so instead of empty result we get 1601, which is incorrect. Possible workaround could be like this: if (l == 0xffffffff && hi != l) l = hi+1; // outlook ... if (r == 0xffffffff && hi != r) r = hi+1; // outlook ... //if (r > hi) r = hi; // <--- throw away this code //if (r < lo) r = lo; // <--- throw away this code
|