enigma icon indicating copy to clipboard operation
enigma copied to clipboard

to_opcode unsafe / undefined behavior

Open mitsuhiko opened this issue 4 years ago • 0 comments

Just saw this project on hackernews and noticed that to_opcode is a problem. If the input falls outside of the opcode range it produces undefined behavior. This probably needs to either assert with a panic or return Option for unknown opcodes.

mitsuhiko avatar Apr 30 '20 16:04 mitsuhiko