FuzzilliJs: Print the result of JS::Value::to_string using AK::outln
JS::Value::to_string now returns a String, which does not have a null- terminated characters() accessor.
This commit is contained in:
parent
8ca528217c
commit
5a1ac851aa
Notes:
sideshowbarker
2024-07-17 02:28:18 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/5a1ac851aa Pull-request: https://github.com/SerenityOS/serenity/pull/17079
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibJS/Forward.h>
|
||||
|
@ -160,7 +161,7 @@ JS_DEFINE_NATIVE_FUNCTION(TestRunnerGlobalObject::fuzzilli)
|
|||
}
|
||||
|
||||
auto string = TRY(vm.argument(1).to_string(vm));
|
||||
fprintf(fzliout, "%s\n", string.characters());
|
||||
outln(fzliout, "{}", string);
|
||||
fflush(fzliout);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue