Mercurial > prosody-hg
comparison util/debug.lua @ 11177:37dc2a6144d1 0.11
util.debug: Fix locals being reported under wrong stack frame in some cases (+tests!!)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 16 Oct 2020 13:38:04 +0100 |
| parents | e5d00bf4a4d5 |
| children | e157e5c79daa |
comparison
equal
deleted
inserted
replaced
| 11175:235537247aa3 | 11177:37dc2a6144d1 |
|---|---|
| 102 if not info then break; end | 102 if not info then break; end |
| 103 | 103 |
| 104 levels[(level-start_level)+1] = { | 104 levels[(level-start_level)+1] = { |
| 105 level = level; | 105 level = level; |
| 106 info = info; | 106 info = info; |
| 107 locals = get_locals_table(thread, level+(thread and 0 or 1)); | 107 locals = get_locals_table(thread, level+1); |
| 108 upvalues = get_upvalues_table(info.func); | 108 upvalues = get_upvalues_table(info.func); |
| 109 }; | 109 }; |
| 110 end | 110 end |
| 111 return levels; | 111 return levels; |
| 112 end | 112 end |
