diff options
author | Martin von Gagern <Martin.vGagern@gmx.net> | 2013-02-09 01:18:02 +0100 |
---|---|---|
committer | Martin von Gagern <Martin.vGagern@gmx.net> | 2013-02-09 01:18:02 +0100 |
commit | cf98c88f01717d0d5b350f2f33293a421893b247 (patch) | |
tree | 7856859a8295976450872989a48db9d7d6ee3403 /src/parseTools.js | |
parent | 5a99d2567e76f257309cfd225876f3a5402e5f46 (diff) |
Avoid some errors which are reported for LDC output of a simple program.
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index e081d0de..a076c862 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -166,6 +166,7 @@ function getBits(type) { } if (isStructType(type)) { var typeData = Types.types[type]; + if (typeData === undefined) return 0; return typeData.flatSize*8; } return 0; @@ -577,7 +578,7 @@ function cleanOutTokens(filterOut, tokens, indexes) { if (typeof indexes !== 'object') indexes = [indexes]; for (var i = indexes.length-1; i >=0; i--) { var index = indexes[i]; - while (tokens[index].text in filterOut) { + while (index < tokens.length && tokens[index].text in filterOut) { tokens.splice(index, 1); } } |