Skip to content

Commit

Permalink
FIX: removed declarations inside FOR loop in code from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Sep 25, 2018
1 parent 7d9a21d commit fb72927
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/f-random.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ static REBI64 ran_arr_cycle()
REBCNT k = length / 8;
REBCNT r = length % 8;
REBYTE *cp = dest;
REBCNT i;

for (REBCNT i = 0; i < k; i++) {
for (i = 0; i < k; i++) {
rnd = Random_Int(TRUE);
memcpy(cp, (REBYTE*)&rnd, 8);
cp += 8;
Expand All @@ -204,7 +205,7 @@ static REBI64 ran_arr_cycle()
}
if(no_zeros) {
// make result without null bytes
for (REBCNT i = 0; i < length; i++) {
for (i = 0; i < length; i++) {
while (dest[i] == 0)
dest[i] = (u8)(rand());
}
Expand Down

0 comments on commit fb72927

Please sign in to comment.