Skip to content

Commit fb72927

Browse files
committed
FIX: removed declarations inside FOR loop in code from previous commit
1 parent 7d9a21d commit fb72927

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/f-random.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ static REBI64 ran_arr_cycle()
192192
REBCNT k = length / 8;
193193
REBCNT r = length % 8;
194194
REBYTE *cp = dest;
195+
REBCNT i;
195196

196-
for (REBCNT i = 0; i < k; i++) {
197+
for (i = 0; i < k; i++) {
197198
rnd = Random_Int(TRUE);
198199
memcpy(cp, (REBYTE*)&rnd, 8);
199200
cp += 8;
@@ -204,7 +205,7 @@ static REBI64 ran_arr_cycle()
204205
}
205206
if(no_zeros) {
206207
// make result without null bytes
207-
for (REBCNT i = 0; i < length; i++) {
208+
for (i = 0; i < length; i++) {
208209
while (dest[i] == 0)
209210
dest[i] = (u8)(rand());
210211
}

0 commit comments

Comments
 (0)