pefile.cpp: make import sorting independent from qsort() internals.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-10-09 00:28:22 +02:00
parent 38a265741c
commit 4b991203df
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -874,7 +874,9 @@ unsigned PeFile::processImports0(ord_mask_t ord_mask) // pass 1
if (u2->ordinal) return 1;
if (!u1->shname) return 1;
if (!u2->shname) return -1;
return strlen(u1->shname) - strlen(u2->shname);
rc = (int) (upx_strlen(u1->shname) - upx_strlen(u2->shname));
if (rc) return rc;
return strcmp(u1->shname, u2->shname);
}
};