aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r--src/libcmd/command.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index 34535802f..cc353cbb4 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -129,7 +129,7 @@ ref<EvalState> EvalCommand::getEvalState()
new DebugTraceStacker(
*evalState,
DebugTrace
- {.pos = *expr.getPos(),
+ {.pos = (error->info().errPos ? *error->info().errPos : *expr.getPos()),
.expr = expr,
.env = env,
.hint = error->info().msg,