Merge pull request #220 from ethereum/fixUnknownSourceLocation

fix unknown source location
pull/7/head
chriseth 8 years ago committed by GitHub
commit beeb9e2ef1
  1. 6
      src/util/sourceMappingDecoder.js

@ -151,13 +151,13 @@ function atIndex (index, mapping) {
continue continue
} }
current = current.split(':') current = current.split(':')
if (ret.start === undefined && current[0] && current[0].length) { if (ret.start === undefined && current[0] && current[0] !== '-1' && current[0].length) {
ret.start = parseInt(current[0]) ret.start = parseInt(current[0])
} }
if (ret.length === undefined && current[1] && current[1].length) { if (ret.length === undefined && current[1] && current[1] !== '-1' && current[1].length) {
ret.length = parseInt(current[1]) ret.length = parseInt(current[1])
} }
if (ret.file === undefined && current[2] && current[2].length) { if (ret.file === undefined && current[2] && current[2] !== '-1' && current[2].length) {
ret.file = parseInt(current[2]) ret.file = parseInt(current[2])
} }
if (ret.jump === undefined && current[3] && current[3].length) { if (ret.jump === undefined && current[3] && current[3].length) {

Loading…
Cancel
Save