Skip to content

Commit 9a00890

Browse files
committed
Fix DEVICE_RANDOM fread call
size and nitems parameters were the wrong way around, so the call did not return 1 as expected, meaning DEVICE_RANDOM functionality failed.
1 parent 796d477 commit 9a00890

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/randLIB.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ uint64_t randLIB_get_64bit(void)
157157
return 0;
158158
}
159159
uint64_t result;
160-
if (fread(&result, 1, sizeof result, random_file) != 1) {
160+
if (fread(&result, sizeof result, 1, random_file) != 1) {
161161
result = 0;
162162
}
163163
return result;

0 commit comments

Comments
 (0)