Fix for qsort to stop aborts.
Detail: If qsort is passed an invalid base pointer and the number of entries is zero, then due to some pointer artihmetic going wrong, it aborts. The fix is to trap zero length arrays and exit quickly. Admin: Required by cmhg prior to version 5.20 which had an explicit fix to prevent triggering this bug. Reportedly this fix is required by PhotoDesk prior to version 3.03. Version 4.96. Tagged as 'RISC_OSLib-4_96'
Showing with 15 additions and 12 deletions