Skip to content

Commit

Permalink
Merge pull request #68 from SettleFinance/master
Browse files Browse the repository at this point in the history
Replace problematic for..in loops with C-style loops
  • Loading branch information
holgerd77 committed Oct 23, 2018
2 parents 00ba846 + 3c73e56 commit 2863c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ ABI.rawEncode = function (types, values) {
}
})

for (var i in types) {
for (var i = 0; i < types.length; i++) {
var type = elementaryName(types[i])
var value = values[i]
var cur = encodeSingle(type, value)
Expand All @@ -375,7 +375,7 @@ ABI.rawDecode = function (types, data) {
var ret = []
data = new Buffer(data)
var offset = 0
for (var i in types) {
for (var i = 0; i < types.length; i++) {
var type = elementaryName(types[i])
var parsed = parseType(type, data, offset)
var decoded = decodeSingle(parsed, data, offset)
Expand Down

0 comments on commit 2863c40

Please sign in to comment.