diff --git a/vvp/stop.cc b/vvp/stop.cc index 8a6970006..b28696a28 100644 --- a/vvp/stop.cc +++ b/vvp/stop.cc @@ -138,7 +138,7 @@ static void cmd_call(unsigned argc, char*argv[]) case vpiTask: case vpiNamedBegin: case vpiNamedFork: - scope = dynamic_cast<__vpiScope*>(table[idx]); + scope = dynamic_cast<__vpiScope*>(table[tmp]); if (strcmp(scope->scope_name(), argv[idx+1]) == 0) handle = table[tmp]; break;