summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/test_disk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c
index 34cb94d9ae..9d186e04f9 100644
--- a/apps/plugins/test_disk.c
+++ b/apps/plugins/test_disk.c
@@ -134,9 +134,9 @@ static bool test_fs(void)
total = TEST_SIZE;
while (total > 0)
{
- current = rb->rand() % (audiobuflen - 4);
+ align = rb->rand() & 0xf;
+ current = rb->rand() % (audiobuflen - align);
current = MIN(current, total);
- align = rb->rand() & 3;
rb->snprintf(text_buf, sizeof text_buf, "Wrt %dKB, %dKB left",
current >> 10, total >> 10);
log_text(text_buf, false);
@@ -163,9 +163,9 @@ static bool test_fs(void)
total = TEST_SIZE;
while (total > 0)
{
- current = rb->rand() % (audiobuflen - 4);
+ align = rb->rand() & 0xf;
+ current = rb->rand() % (audiobuflen - align);
current = MIN(current, total);
- align = rb->rand() & 3;
rb->snprintf(text_buf, sizeof text_buf, "Cmp %dKB, %dKB left",
current >> 10, total >> 10);
log_text(text_buf, false);