From 3352e23d5aea9c8fc24147ae6210c7fcee2db0fc Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 28 Dec 2021 17:03:40 -0800 Subject: [Fuzzer] Allow empty data in --translate-to-fuzz (#4406) When a parameter and a member variable have the same name within a constructor, to access (and change) the member variable, we need to either use `this->` or change the name of the parameter. The current code ended up changing the parameter and didn't affect the status of the member variable, which remained empty. --- src/tools/fuzzing/random.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/fuzzing/random.cpp b/src/tools/fuzzing/random.cpp index 3d8297c15..8beda478b 100644 --- a/src/tools/fuzzing/random.cpp +++ b/src/tools/fuzzing/random.cpp @@ -20,8 +20,8 @@ namespace wasm { -Random::Random(std::vector&& bytes, FeatureSet features) - : bytes(std::move(bytes)), features(features) { +Random::Random(std::vector&& bytes_, FeatureSet features) + : bytes(std::move(bytes_)), features(features) { // Ensure there is *some* input to be read. if (bytes.empty()) { bytes.push_back(0); -- cgit v1.2.3