mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-16 19:23:22 +08:00
Reference to MAX_RAND should be RAND_MAX
This commit is contained in:
parent
0bf5e9378d
commit
d2d5d42a7e
@ -274,7 +274,7 @@ int clistbox_main(int argc, char *argv[])
|
|||||||
printf("clistbox_main: Selecting five options\n");
|
printf("clistbox_main: Selecting five options\n");
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
selected[i] = ((nOptions - 1) * rand()) / MAX_RAND;
|
selected[i] = ((nOptions - 1) * rand()) / RAND_MAX;
|
||||||
printf("clistbox_main: Selecting option %d\n", selected[i]);
|
printf("clistbox_main: Selecting option %d\n", selected[i]);
|
||||||
listbox->removeOption(selected[i]);
|
listbox->removeOption(selected[i]);
|
||||||
test->showListBox(listbox);
|
test->showListBox(listbox);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user