Commit 0eb46f26 authored by yann300's avatar yann300

decode bool

parent ca1a6dad
...@@ -12,4 +12,12 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) { ...@@ -12,4 +12,12 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) {
return value !== '00' return value !== '00'
} }
Bool.prototype.decodeLocals = function (stackHeight, stack, memory) {
if (stack.length - 1 < stackHeight) {
return false
} else {
return util.extractHexByteSlice(stack[stack.length - 1 - stackHeight], this.storageBytes, 0) !== '00'
}
}
module.exports = Bool module.exports = Bool
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment