Added KeyError Exception for offsets not in srcmap. Issue #832 (#839)

This commit is contained in:
Arun John Kuruvilla 2018-03-30 10:44:34 -04:00 committed by Mark Mossberg
parent 03af65e55f
commit 2f382a9d1c

View File

@ -230,7 +230,10 @@ class SolidityMetadata(object):
else: else:
srcmap = self.srcmap srcmap = self.srcmap
try:
beg, size, _, _ = srcmap[asm_offset] beg, size, _, _ = srcmap[asm_offset]
except KeyError:
return ''
output = '' output = ''
nl = self.source_code.count('\n') nl = self.source_code.count('\n')