We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9edd6eb commit 49f6301Copy full SHA for 49f6301
lib/opFns.js
@@ -131,15 +131,13 @@ module.exports = {
131
132
return result
133
},
134
- SIGNEXTEND: function (k, runState) {
+ SIGNEXTEND: function (k, val, runState) {
135
k = new BN(k)
136
var extendOnes = false
137
138
if (k.cmpn(31) <= 0) {
139
k = k.toNumber()
140
141
- var val = new Buffer(utils.setLengthLeft(runState.stack.pop(), 32))
142
-
143
if (val[31 - k] & 0x80) {
144
extendOnes = true
145
}
@@ -149,8 +147,9 @@ module.exports = {
149
147
val[i] = extendOnes ? 0xff : 0
150
148
151
152
- return val
153
+
+ return val
154
155
// 0x10 range - bit ops
156
LT: function (a, b, runState) {
0 commit comments