str.lstrip('0x') strips any combination of '0' and 'x' characters from
the left, not the literal two-character prefix '0x'. For subnet masks
where the hex digits start with '0' (e.g. '0x00000000' for a /0 mask),
lstrip strips all leading zeros along with the 'x', producing an empty
string instead of '00000000'.
Replace with a slice [2:] which correctly removes exactly the first two
characters ('0x') regardless of what follows.
This bug affected both the legacy ipv4_mask field and the ipv4[] list
items in _process() (lines 267 and 292).
Fixes#685
lstrip(" Directory of ") strips any character in the set
{' ','D','i','r','e','c','t','o','y','f'}, which incorrectly removes
the 'D' from D:\ paths. Use fixed-length prefix removal with [len():]
instead.
Fixes#687
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lstrip('0x') strips any character in {'0','x'} from the left, not the
literal prefix "0x". This causes incorrect mask conversion for masks
with leading zero hex digits (e.g. 0x00000000 -> empty string instead
of 0.0.0.0).
Replace lstrip('0x') with [2:] to correctly remove only the '0x'
prefix. Fixes both the legacy ipv4_mask field and the ipv4[] list.
Fixes#685
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: split out test fixtures for long ipv6 traceroute for consistency
* refactor(jc/parsers/traceroute): remove duplicate ParseError class
* refactor(jc/parsers/traceroute): pre-process data in _loads() for easy-to-reuse
* refactor(jc/parsers/traceroute): split hop serialization into separate function to reuse
* refactor(jc/parsers/traceroute): simplify numeric conversion and make it reusable for traceroute_s
* fix(jc/parsers/traceroute): stricter regex to match traceroute headers only
* feat(jc/parsers/traceroute_s): v1.0 implementation
* fix(jc/parsers/traceroute): revert "_" prefix in function and class names
* fixup! fix(jc/parsers/traceroute): revert "_" prefix in function and class names
* chore(jc/parsers/traceroute): update the author information