WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
537 stars 77 forks source link

bugfix: examples that load binaries using fopen must use "rb" mode, "r" is insufficient on some platforms. #136

Closed adv-sw closed 4 years ago

adv-sw commented 4 years ago

Tried loading another file into hello.c & it failed because text read mode open instead of binary.

Sample code hello.c currently reads :

FILE* file = fopen("hello.wasm", "r");

Should read :

FILE* file = fopen("hello.wasm", "rb");