mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 15:55:01 -04:00
Fixed IPv6 sorting
This commit is contained in:
parent
9b2d2c65ca
commit
74e2e7e924
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ class Sort extends Operation {
|
|||
static _ipv6Sort(a, b) {
|
||||
const ipLib = require("../lib/IP.mjs");
|
||||
const numericalA = ipLib.strToIpv6(a, false), numericalB = ipLib.strToIpv6(b, false);
|
||||
return numericalA < numericalB ? -1 : 1;
|
||||
return numericalA - numericalB;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue