extensions
Volodymyr Shymanskyy 5 years ago
parent 9cb99f8671
commit d8c696f095

@ -24,11 +24,17 @@ M3Result repl_load (IM3Runtime runtime, const char* fn)
fsize = ftell(f);
fseek (f, 0, SEEK_SET);
if (fsize > 10*1024*1024) {
if (fsize < 8) {
return "file is too small";
} else if (fsize > 10*1024*1024) {
return "file too big";
}
wasm = (u8*) malloc(fsize);
if (!wasm) {
return "cannot allocate memory for wasm binary";
}
fread (wasm, 1, fsize, f);
fclose (f);

@ -360,7 +360,7 @@ m3ApiRawFunction(m3_wasi_unstable_path_open)
memcpy (host_path, path, path_len);
host_path [path_len] = '\0'; // NULL terminator
printf ("== path_open: %s\n", host_path);
//printf ("== path_open: %s\n", host_path);
#ifdef _WIN32
// TODO: This all needs a proper implementation

Loading…
Cancel
Save