Skip to content

Commit

Permalink
patch CS_ERR_OK message
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinafyi committed Aug 27, 2024
1 parent 5e91c72 commit dd8c2a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/aslp.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ const synchroniseInputs = async (writeback, el) => {
try {
mnemonic = !err ? await stoneworker.bytes2asm(Comlink.transfer(bytes, [bytes.buffer])) : '';
} catch (exn) {
err = err || exn.toString();
let s = exn.toString();
if (s.includes('CS_ERR_OK'))
s = 'no recognised instruction';
err = err || s;
// console.error('error in bytes2asm:', exn);
}
asmInput.value = mnemonic;
Expand Down

0 comments on commit dd8c2a0

Please sign in to comment.