enable optimization for Nim devel

This commit is contained in:
Antonis Geralis 2022-09-03 18:52:43 +03:00
parent 6e78f5c8a3
commit 2c9a7a85d5
1 changed files with 4 additions and 1 deletions

View File

@ -573,6 +573,9 @@ template mutatorImpl*(target, mutator, typ: untyped) =
if data.len > 1: if data.len > 1:
#var pos = 1 #var pos = 1
#fromData(data, pos, x) #fromData(data, pos, x)
when (NimMajor, NimMinor, NimPatch) >= (1, 7, 1):
x = move getInput(x, data)
else:
x = getInput(x, data) x = getInput(x, data)
FuzzMutator(mutator)(x, maxLen-x.byteSize, r) FuzzMutator(mutator)(x, maxLen-x.byteSize, r)
result = x.byteSize+1 # +1 for the skipped byte result = x.byteSize+1 # +1 for the skipped byte