From 8e1c6bb876bf8d4fc10246bab62d142e2db5cae9 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 16 Sep 2021 12:27:56 +0100 Subject: [PATCH] Fix error message accessing invalid tokens in filter --- qrenderdoc/Windows/EventBrowser.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index aa0f639e5..505e7d260 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -1869,10 +1869,15 @@ Available numeric properties. Compare with $event(prop > 100) or = operators.size()) { @@ -2269,7 +2274,7 @@ and these can be queried with a filter such as $action(flags & Clear|Clear if(tokens.size() < 3 || (tokens[1].text != lit("&") && tokens[1].text != lit("="))) { trace.position = tokens[0].position; - trace.length = (tokens[1].position + tokens[1].length) - trace.position + 1; + trace.length = (tokens.back().position + tokens.back().length) - trace.position + 1; trace.setError(tr("Expected $action(flags & ...)", "EventFilterModel")); return NULL; }