From 5b4c0d0585fe35e71ed1ab7fddc9d1dd004e44bf Mon Sep 17 00:00:00 2001 From: Antonis Geralis Date: Wed, 14 Sep 2022 13:00:27 +0300 Subject: [PATCH] enable for more types - byte arrays still use builtin mutator --- drchaos/mutator.nim | 22 ++++++++-------------- examples/fuzz_graph.nim | 1 - 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drchaos/mutator.nim b/drchaos/mutator.nim index 6c356d0..b7c9fed 100644 --- a/drchaos/mutator.nim +++ b/drchaos/mutator.nim @@ -283,7 +283,7 @@ proc sample[T: SomeNumber](x: T; s: var Sampler; r: var Rand; res: var int) = proc sample[T](x: seq[T]; s: var Sampler; r: var Rand; res: var int) = sampleAttempt(attempt(s, r, DefaultMutateWeight, res)) - when T is PostProcessTypes: + when T isnot ByteSized: for i in 0..