From 28659d068705aded4405b18b844d50f4dc05e3d9 Mon Sep 17 00:00:00 2001 From: Yi2255 Date: Thu, 24 Oct 2024 00:33:13 +0000 Subject: [PATCH] Fix non-iteratrable input of yieldEach --- Sources/Fuzzilli/Base/ProgramBuilder.swift | 9 +++++++++ Sources/Fuzzilli/CodeGen/CodeGenerators.swift | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Sources/Fuzzilli/Base/ProgramBuilder.swift b/Sources/Fuzzilli/Base/ProgramBuilder.swift index 3eb4cb968..04fb8fa88 100644 --- a/Sources/Fuzzilli/Base/ProgramBuilder.swift +++ b/Sources/Fuzzilli/Base/ProgramBuilder.swift @@ -2711,4 +2711,13 @@ public class ProgramBuilder { break } } + + public func buildIteratorVariable(_ b: ProgramBuilder, _ it: Variable) -> Variable{ + if(b.type(of: it).Is(.iterable)){ + return it + } + let initialValues = (0..