summaryrefslogtreecommitdiffstats
path: root/src/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag.c')
-rw-r--r--src/diag.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/diag.c b/src/diag.c
index 80d988f..c5e139e 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -114,12 +114,14 @@ static bool highlight_expr_recursive(const struct bfs_ctx *ctx, const struct bfs
bool ret = false;
- if (!expr->synthetic) {
- size_t i = expr->argv - ctx->argv;
- for (size_t j = 0; j < expr->argc; ++j) {
- assert(i + j < ctx->argc);
- args[i + j] = true;
- ret = true;
+ for (size_t i = 0; i < ctx->argc; ++i) {
+ if (&ctx->argv[i] == expr->argv) {
+ for (size_t j = 0; j < expr->argc; ++j) {
+ assert(i + j < ctx->argc);
+ args[i + j] = true;
+ ret = true;
+ }
+ break;
}
}