Skip to content

Commit

Permalink
fixed issue using fpredictor without files
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo committed Apr 27, 2017
1 parent 2f1cfb3 commit 17ca875
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vdiscover/Mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,17 @@ def __init__(self, inputs, mutator):
self.i = 0
self.inputs = map(mutator, inputs)
self.inputs_len = len(self.inputs)
self.symb_inputs = filter(lambda x: x[1].input.isSymbolic(), enumerate(self.inputs))
self.symb_inputs_len = len(self.symb_inputs)

def __iter__(self):
return self

def next(self, mutate=True):
r = []
delta = None
symb_inputs = filter(lambda __x: __x[1].input.isSymbolic(
) and __x[1].input.GetType() == "file", enumerate(self.inputs))
symb_inputs_len = len(symb_inputs)

self.i = symb_inputs[random.randrange(symb_inputs_len)][0]
self.i = self.symb_inputs[random.randrange(self.symb_inputs_len)][0]

for j, m in enumerate(self.inputs):
if self.i == j:
Expand Down

0 comments on commit 17ca875

Please sign in to comment.