Skip to content

Commit

Permalink
Don't allow slurp by default in vm
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Nov 20, 2023
1 parent b7cf2e6 commit 3b33173
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/vm.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1850,8 +1850,12 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
of opcSlurp:
decodeB(rkNode)
createStr regs[ra]
regs[ra].node.strVal = opSlurp(regs[rb].node.strVal, c.debug[pc],
c.module, c.config)
when defined(nimcore):
regs[ra].node.strVal = opSlurp(regs[rb].node.strVal, c.debug[pc],
c.module, c.config)
else:
regs[ra].node.strVal = ""
globalError(c.config, c.debug[pc], "VM is not built with 'slurp' support")
of opcGorge:
decodeBC(rkNode)
inc pc
Expand Down

0 comments on commit 3b33173

Please sign in to comment.