Skip to content

Commit c51be75

Browse files
committed
modified: src/esp32.cpp
Fix bug with randomness
1 parent da90c6c commit c51be75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/esp32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ int esp32_Randomness( sqlite3_vfs * vfs, int len, char * buffer )
592592
{
593593
long rdm;
594594
int sz = 1 + (len / sizeof(long));
595-
char a_rdm[sz];
595+
char a_rdm[sz * sizeof(long)];
596596
while (sz--) {
597597
rdm = random(LONG_MAX - 1);
598598
memcpy(a_rdm + sz * sizeof(long), &rdm, sizeof(long));

0 commit comments

Comments
 (0)