Changeset 2808 for libpipi/trunk


Ignore:
Timestamp:
Aug 30, 2008, 12:06:04 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • median.c: oops, fix argument types in the qsort call.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/filter/median.c

    r2807 r2808  
    3030static int cmpint(void const *i1, void const *i2)
    3131{
    32     return *(int const *)i1 > *(int const *)i2;
     32    return *(double const *)i1 < *(double const *)i2;
    3333}
    3434
     
    105105
    106106            /* Sort the list */
    107             qsort(list, size, sizeof(int), cmpint);
     107            qsort(list, size, sizeof(double), cmpint);
    108108            if(!gray)
    109109            {
    110                 qsort(list + size, size, sizeof(int), cmpint);
    111                 qsort(list + 2 * size, size, sizeof(int), cmpint);
    112                 qsort(list + 3 * size, size, sizeof(int), cmpint);
     110                qsort(list + size, size, sizeof(double), cmpint);
     111                qsort(list + 2 * size, size, sizeof(double), cmpint);
     112                qsort(list + 3 * size, size, sizeof(double), cmpint);
    113113            }
    114114
Note: See TracChangeset for help on using the changeset viewer.