瀏覽代碼

fix qsort_compareentries

Wichert Akkerman 25 年之前
父節點
當前提交
b8f468efd4
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 4 0
      ChangeLog
  2. 2 2
      dselect/pkglist.cc

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+Tue Apr 24 01:40:11 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
+
+  * dselect/pkglist.cc: repair qsort_compareentries
+
 Mon Apr 23 18:08:37 CDT 2001 Adam Heath <doogie@debian.org>
 
   * lib/parsehelp.c: Reduce memory a tad.

+ 2 - 2
dselect/pkglist.cc

@@ -140,8 +140,8 @@ void packagelist::addheading(enum ssavailval ssavail,
 static packagelist *sortpackagelist;
 
 int qsort_compareentries(const void *a, const void *b) {
-  return sortpackagelist->compareentries((const struct perpackagestate*)&a,
-                                         (const struct perpackagestate*)&b);
+  return sortpackagelist->compareentries(*(const struct perpackagestate**)a,
+                                         *(const struct perpackagestate**)b);
 }
 
 void packagelist::sortinplace() {