]> git.llucax.com Git - software/dgc/dgcbench.git/commitdiff
rnd_data_2.d: Fix out of bounds error
authorLeandro Lucarella <llucax@gmail.com>
Sat, 19 Sep 2009 20:57:01 +0000 (17:57 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Sat, 19 Sep 2009 20:57:01 +0000 (17:57 -0300)
micro/rnd_data_2.d

index 1cd89bfc70c4543027a45b214de0036e72088a3b..545d588e17085360beac4caa9bc335485f8fd66f 100644 (file)
@@ -29,7 +29,7 @@ int main(char[][] args)
          }
 
          int zig = i;
-         if (zig > stuff.length)
+         if (zig >= stuff.length)
              zig = rand.uniform!(int) % stuff.length;
 
          stuff[zig] = arr;