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 Jan 9, 2024
1 parent ec83e72 commit ccf10a8
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 @@ -1898,8 +1898,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 ccf10a8

Please sign in to comment.