X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftracefile.c;h=a84381e9ec5c07789f7711353fa638f7d513955e;hb=b1369bef0ea0b917910103745570a913af4348a6;hp=da5b356c15b092c8d66c419ec72b402532a606e4;hpb=36d36c9f7565d90fdbe9de5532b096507c6b92b3;p=lttv.git diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index da5b356c..a84381e9 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -1431,10 +1431,10 @@ int ltt_tracefile_seek_time(LttTracefile *tf, LttTime time) } else if(ltt_time_compare(time, tf->buffer.begin.timestamp) < 0) { /* go to lower part */ - high = block_num; + high = block_num - 1; } else if(ltt_time_compare(time, tf->buffer.end.timestamp) > 0) { /* go to higher part */ - low = block_num; + low = block_num + 1; } else {/* The event is right in the buffer! (or in the next buffer first event) */ while(1) {