fixes #395
This commit is contained in:
parent
fcb4344ac5
commit
4e6b81e341
2 changed files with 9 additions and 7 deletions
|
|
@ -98,13 +98,13 @@ proc ToTreeSet(s: TBitSet, settype: PType, info: TLineInfo): PNode =
|
|||
result.typ = settype
|
||||
result.info = info
|
||||
e = 0
|
||||
while e < high(s) * elemSize:
|
||||
while e < len(s) * elemSize:
|
||||
if bitSetIn(s, e):
|
||||
a = e
|
||||
b = e
|
||||
while true:
|
||||
Inc(b)
|
||||
if (b > high(s) * elemSize) or not bitSetIn(s, b): break
|
||||
if (b >= len(s) * elemSize) or not bitSetIn(s, b): break
|
||||
Dec(b)
|
||||
if a == b:
|
||||
addSon(result, newIntTypeNode(nkIntLit, a + first, elemType))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue