Skip to content

Commit 17ca875

Browse files
author
gustavo
committed
fixed issue using fpredictor without files
1 parent 2f1cfb3 commit 17ca875

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vdiscover/Mutation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,17 @@ def __init__(self, inputs, mutator):
232232
self.i = 0
233233
self.inputs = map(mutator, inputs)
234234
self.inputs_len = len(self.inputs)
235+
self.symb_inputs = filter(lambda x: x[1].input.isSymbolic(), enumerate(self.inputs))
236+
self.symb_inputs_len = len(self.symb_inputs)
235237

236238
def __iter__(self):
237239
return self
238240

239241
def next(self, mutate=True):
240242
r = []
241243
delta = None
242-
symb_inputs = filter(lambda __x: __x[1].input.isSymbolic(
243-
) and __x[1].input.GetType() == "file", enumerate(self.inputs))
244-
symb_inputs_len = len(symb_inputs)
245244

246-
self.i = symb_inputs[random.randrange(symb_inputs_len)][0]
245+
self.i = self.symb_inputs[random.randrange(self.symb_inputs_len)][0]
247246

248247
for j, m in enumerate(self.inputs):
249248
if self.i == j:

0 commit comments

Comments
 (0)