This commit is contained in:
Yuriy Glukhov 2017-02-28 17:23:25 +02:00
commit e213b120ab

View file

@ -181,7 +181,7 @@ proc mangle*(name: string): string =
of '_': of '_':
# we generate names like 'foo_9' for scope disambiguations and so # we generate names like 'foo_9' for scope disambiguations and so
# disallow this here: # 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 discard
else: else:
add(result, c) add(result, c)