Index: src/sort.c =================================================================== --- src/sort.c.orig 2010-05-06 15:16:27.475859128 +0200 +++ src/sort.c 2010-05-06 15:16:53.899859247 +0200 @@ -2712,7 +2712,10 @@ keycompare_mb (const struct line *a, con size_t lenb = limb <= textb ? 0 : limb - textb; /* Actually compare the fields. */ - if (key->numeric | key->general_numeric) + + if (key->random) + diff = compare_random (texta, lena, textb, lenb); + else if (key->numeric | key->general_numeric) { char savea = *lima, saveb = *limb;