This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://url.spec.whatwg.org/#host-parsing [[ While piece pointer is not zero ]] Shouldn't this be While piece pointer is not zero and swaps is greater than zero
If you could explain why that would help a lot. Thanks.
I found that my code was swapping too many pieces which also resulted in memory access violations. Adding this change fixed the problem and caused all my IPv6 parse testing to pass. Also, swaps is the number of pieces that need to be swapped, so when it gets to 0 it doesn't make any sense to continue swapping, and if swapping continues, will result in corruption.
Thanks Albert! https://github.com/whatwg/url/commit/72e58483bf3cfe2c773ba3b87a710ace0e11ff12