Skip to content

Commit 4623380

Browse files
committed
Always properly throw VMError
1 parent 4bbdf55 commit 4623380

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runCode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ module.exports = function (opts, cb) {
213213
if (result !== undefined) {
214214
if (retNum !== 1) {
215215
// opcode post-stack mismatch
216-
return cb(VmError(ERROR.INTERNAL_ERROR))
216+
return cb(new VmError(ERROR.INTERNAL_ERROR))
217217
}
218218

219219
runState.stack.push(result)
220220
} else {
221221
if (!opInfo.async && retNum !== 0) {
222222
// opcode post-stack mismatch
223-
return cb(VmError(ERROR.INTERNAL_ERROR))
223+
return cb(new VmError(ERROR.INTERNAL_ERROR))
224224
}
225225
}
226226

0 commit comments

Comments
 (0)