summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8968116)
The trim code was inappropriately bailing once either list was
exhausted, before also exhausting the user's other requested list.
This fixes the traces/trim-frames-and-calls test recently added to the
apitrace-tests repository.
Thanks to Eric Anholt for reporting this bug.
trace::Call *call;
while ((call = p.parse_call())) {
trace::Call *call;
while ((call = p.parse_call())) {
- /* There's no use doing any work past the last call or frame
+ /* There's no use doing any work past the last call and frame
* requested by the user. */
* requested by the user. */
- if (call->no > options->calls.getLast() ||
- frame > options->frames.getLast()) {
-
+ if ((options->calls.empty() || call->no > options->calls.getLast()) &&
+ (options->frames.empty() || frame > options->frames.getLast())) {
+
call_range_last = -1;
while ((call = p.parse_call())) {
call_range_last = -1;
while ((call = p.parse_call())) {
- /* There's no use doing any work past the last call or frame
+ /* There's no use doing any work past the last call and frame
* requested by the user. */
* requested by the user. */
- if (call->no > options->calls.getLast() ||
- frame > options->frames.getLast()) {
+ if ((options->calls.empty() || call->no > options->calls.getLast()) &&
+ (options->frames.empty() || frame > options->frames.getLast())) {