mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
23278: fix NUMERICGLOBSORT, broken by multibyte fixes
This commit is contained in:
parent
f368975eff
commit
7bb711a3d6
3 changed files with 25 additions and 3 deletions
|
|
@ -42,8 +42,8 @@ eltpcmp(const void *a, const void *b)
|
|||
{
|
||||
const SortElt ae = *(const SortElt *)a;
|
||||
const SortElt be = *(const SortElt *)b;
|
||||
const char *as = ae->cmp;
|
||||
const char *bs = be->cmp;
|
||||
const char *as = ae->cmp, *bs = be->cmp;
|
||||
const char *ao = as;
|
||||
int cmp;
|
||||
|
||||
if (ae->len != -1 || be->len != -1) {
|
||||
|
|
@ -122,7 +122,7 @@ eltpcmp(const void *a, const void *b)
|
|||
cmp = (int)STOUC(*as) - (int)STOUC(*bs);
|
||||
#endif
|
||||
if (idigit(*as) || idigit(*bs)) {
|
||||
for (; as > *(char **)a && idigit(as[-1]); as--, bs--);
|
||||
for (; as > ao && idigit(as[-1]); as--, bs--);
|
||||
if (idigit(*as) && idigit(*bs)) {
|
||||
while (*as == '0')
|
||||
as++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue