Index: libgosm.cpp
===================================================================
--- libgosm.cpp	(Revision 17900)
+++ libgosm.cpp	(Arbeitskopie)
@@ -1545,8 +1553,8 @@
     fflush (groupf[i]);
     unsigned *idx = (unsigned *) mmap (NULL, fsize,
 				       PROT_READ | PROT_WRITE, MAP_SHARED, fileno (groupf[i]), 0);
-    qsort (idx, fsize / sizeof (*idx), sizeof (*idx), IdxCmp);
-    FWRITE (idx, fsize, 1, pak);
+    qsort  (idx, fsize / sizeof (*idx), sizeof (*idx), IdxCmp);
+    FWRITE (idx, sizeof (*idx), fsize / sizeof (*idx), pak);
 #if 0
     for (int j = 0; j < fsize / (int) sizeof (*idx); j++) {
       printf ("%.*s\n", strcspn (data + idx[j], "\n"), data + idx[j]);
