For .num key there can be data after num
FossilOrigin-Name: 142bc2f1d430ef12ac8347ff7a7e77b1b957c6be11e970f4aa5ad709bf7e5eab
This commit is contained in:
parent
2cc0ca6f17
commit
f996e52776
@ -1,3 +1,6 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "ktv.h"
|
||||
/**
|
||||
* @brief Default function to compare two values of type #cw_KTV_t.
|
||||
@ -34,8 +37,21 @@ int cw_ktv_mavlcmp(const void *v1, const void *v2)
|
||||
return rc;
|
||||
}
|
||||
|
||||
i1 = atoi(d1+1);
|
||||
i2 = atoi(d2+1);
|
||||
d1++;
|
||||
d2++;
|
||||
i1 = atoi(d1);
|
||||
i2 = atoi(d2);
|
||||
|
||||
rc = i1-i2;
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
while (isdigit(*d1))
|
||||
d1++;
|
||||
while (isdigit(*d2))
|
||||
d2++;
|
||||
|
||||
return strcmp(d1,d2);
|
||||
|
||||
|
||||
return i1-i2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user