From e213b120ab1ba4f1e6a4e50d9972a9a412ba6cdb Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Tue, 28 Feb 2017 17:23:25 +0200 Subject: [PATCH] Fixes #5452 --- compiler/ccgutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ccgutils.nim b/compiler/ccgutils.nim index 46a9177ad9..ff8f768bd3 100644 --- a/compiler/ccgutils.nim +++ b/compiler/ccgutils.nim @@ -181,7 +181,7 @@ proc mangle*(name: string): string = of '_': # we generate names like 'foo_9' for scope disambiguations and so # disallow this here: - if i < name.len-1 and name[i+1] in Digits: + if i > 0 and i < name.len-1 and name[i+1] in Digits: discard else: add(result, c)