diff options
author | Ben Smith <binjimin@gmail.com> | 2017-09-19 12:07:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 12:07:20 -0700 |
commit | fcb45be2153896ef57ab5ed562f3b551735fd3be (patch) | |
tree | 9b1a84c5cbb5b6838c39244bd5ae7cc80c75190e /src/binary-reader-interpreter.cc | |
parent | 15c4a0021cfcd8561779dfde07ff9e380bc12b7b (diff) | |
download | wabt-fcb45be2153896ef57ab5ed562f3b551735fd3be.tar.gz wabt-fcb45be2153896ef57ab5ed562f3b551735fd3be.tar.bz2 wabt-fcb45be2153896ef57ab5ed562f3b551735fd3be.zip |
Correctly report the value of bad opcodes (#630)
Previously the opcode would always return 0.
Since `Opcode` only stores an enumeration, we represent invalid opcodes
as a negative number. This way `Opcode::GetInfo` can return the invalid
prefix and opcode number.
For now, these values are both 1-byte, but the current encoding can
be expanded to 2**24 opcodes.
Diffstat (limited to 'src/binary-reader-interpreter.cc')
0 files changed, 0 insertions, 0 deletions