diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-18 07:39:51 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-18 12:52:25 +0000 |
commit | 5a1ac851aa4a8a6b4764cb019b9ed24975bd55c2 (patch) | |
tree | e9f597b2101da7c94467c7e07c3d2d66e00da5b0 | |
parent | 8ca528217c82ab8966a7c661ba92fa11975f5b26 (diff) | |
download | serenity-5a1ac851aa4a8a6b4764cb019b9ed24975bd55c2.zip |
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.
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzilliJs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp index 423484ad82..d8077d4da1 100644 --- a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp +++ b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp @@ -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); } |