diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/regex.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/regex.nim b/src/js/regex.nim index eb4fe365..f34f88e1 100644 --- a/src/js/regex.nim +++ b/src/js/regex.nim @@ -191,7 +191,7 @@ proc exec*(regex: Regex, str: string, start = 0, length = -1, nocaps = false): R if captureCount == 0 or nocaps: break let cstrAddress = cast[int](cstr) - start = cast[ptr int](cast[int](capture) + sizeof(ptr uint8))[] - cstrAddress + start = (cast[ptr int](cast[int](capture) + sizeof(ptr uint8))[] - cstrAddress) shr cint(not ascii) var i = 0 while i < captureCount * sizeof(ptr uint8): let s = cast[ptr int](cast[int](capture) + i)[] - cstrAddress |