diff --git a/onefile/history-dates-test.c b/onefile/history-dates-test.c index b08a562..9240035 100644 --- a/onefile/history-dates-test.c +++ b/onefile/history-dates-test.c @@ -124,6 +124,15 @@ void load(const char *filename) { dates[dateCount++] = r->date; } + for(int i = 0; i < 2*recCount; ++i) { + int a = randomNumber(0, recCount - 1); + int b = randomNumber(0, recCount - 1); + if (a == b) continue; + Record r; + memcpy(&r, &records[a], sizeof(r)); + memcpy(&records[a], &records[b], sizeof(r)); + memcpy(&records[b], &r, sizeof(r)); + } if (recCount > MAXQUESTS) recCount = MAXQUESTS; }