mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Meta: Manually compute the length of the WASM JS REPL source string
The REPL does not have a reliable way to tell us the UTF-8 byte count of the source string, so we must use strlen() ourselves.
This commit is contained in:
parent
fcc3348bc8
commit
d50b9165cd
1 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ extern "C" int initialize_repl(char const* time_zone)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern "C" bool execute(char const* s, u32 length)
|
||||
extern "C" bool execute(char const* source)
|
||||
{
|
||||
return parse_and_run(*g_interpreter, { s, length }, "REPL"sv);
|
||||
return parse_and_run(*g_interpreter, { source, strlen(source) }, "REPL"sv);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue