diff options
-rw-r--r-- | src/nre.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nre.nim b/src/nre.nim index 92cc7bbf4..29313e9eb 100644 --- a/src/nre.nim +++ b/src/nre.nim @@ -249,7 +249,7 @@ proc initRegex*(pattern: string, options = "Sx"): Regex = if opts.study: # XXX investigate JIT result.pcreExtra = pcre.study(result.pcreObj, 0x0, addr errorMsg) - if result.pcreExtra == nil: + if errorMsg != nil: raise StudyError(msg: $errorMsg) result.captureNameToId = result.getNameToNumberTable() |