summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-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)
134 total = TEST_SIZE; 134 total = TEST_SIZE;
135 while (total > 0) 135 while (total > 0)
136 { 136 {
137 current = rb->rand() % (audiobuflen - 4); 137 align = rb->rand() & 0xf;
138 current = rb->rand() % (audiobuflen - align);
138 current = MIN(current, total); 139 current = MIN(current, total);
139 align = rb->rand() & 3;
140 rb->snprintf(text_buf, sizeof text_buf, "Wrt %dKB, %dKB left", 140 rb->snprintf(text_buf, sizeof text_buf, "Wrt %dKB, %dKB left",
141 current >> 10, total >> 10); 141 current >> 10, total >> 10);
142 log_text(text_buf, false); 142 log_text(text_buf, false);
@@ -163,9 +163,9 @@ static bool test_fs(void)
163 total = TEST_SIZE; 163 total = TEST_SIZE;
164 while (total > 0) 164 while (total > 0)
165 { 165 {
166 current = rb->rand() % (audiobuflen - 4); 166 align = rb->rand() & 0xf;
167 current = rb->rand() % (audiobuflen - align);
167 current = MIN(current, total); 168 current = MIN(current, total);
168 align = rb->rand() & 3;
169 rb->snprintf(text_buf, sizeof text_buf, "Cmp %dKB, %dKB left", 169 rb->snprintf(text_buf, sizeof text_buf, "Cmp %dKB, %dKB left",
170 current >> 10, total >> 10); 170 current >> 10, total >> 10);
171 log_text(text_buf, false); 171 log_text(text_buf, false);