diff options
author | Araq <rumpf_a@web.de> | 2017-12-13 13:48:48 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-12-28 09:21:22 +0100 |
commit | 1c2dee18d09c383bce51e9821f0f18656e71bb76 (patch) | |
tree | 4cd076f3f51fde84778b6e5334bb19dd37d0aee2 | |
parent | b3055d8735ca012b77121c16bcf62e3f311084e8 (diff) | |
download | Nim-1c2dee18d09c383bce51e9821f0f18656e71bb76.tar.gz |
attempt to get the stack trace logic right; fix boundaries
-rw-r--r-- | lib/pure/asyncfutures.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/asyncfutures.nim b/lib/pure/asyncfutures.nim index ea7a798fc..f3b4234cc 100644 --- a/lib/pure/asyncfutures.nim +++ b/lib/pure/asyncfutures.nim @@ -237,10 +237,10 @@ proc mergeEntries(entries: seq[StackTraceEntry]): seq[StackTraceEntry] = # either the nested block is new, then we insert it, or we discard it # completely. 'diff' is the wrong idea here. - var last = result.len + var last = result.len-1 var e = reRaiseEnd-1 var newBlock = true - while last > 0 and e > i+1: + while last >= 0 and e >= i+1: if result[last] != entries[e]: newBlock = false break |