Skip to content

Commit

Permalink
Implemented all changes from #230 and #221
Browse files Browse the repository at this point in the history
  • Loading branch information
torch2424 committed Feb 21, 2019
1 parent f678854 commit b8743d5
Show file tree
Hide file tree
Showing 6 changed files with 1,648 additions and 1,586 deletions.
9 changes: 1 addition & 8 deletions core/portable/portable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ export function u16Portable(param: u16): u16 {
}

export function i8Portable(param: i8): i8 {
// JS ints are all i32, therefore, get the sign bit, and then convert accordingly
// Example: https://blog.michaelyin.info/convert-8bit-byte-to-signed-int/
let response: i32 = param;
if (checkBitOnByte(7, response)) {
response = (256 - <i32>param) * -1;
}

return <i8>response;
return (param << 24) >> 24;
}

export function i32Portable(param: i32): i32 {
Expand Down
Binary file modified dist/core/core.untouched.wasm
Binary file not shown.
Loading

0 comments on commit b8743d5

Please sign in to comment.