PF_OVERFLOW is part of p3_flags, not p3_codes. Testing p3_codes meant
that the disk would be drawn when CC_OFF_RIGHT was unset. This seems
unlikely to be what was intended, so fix the mismatch by switching to
use p3_flags instead of switching the symbolic constant.
Descent 2: Vertigo level 10 has invalid data in its control center
triggers. Sanitize invalid data at load to avoid problems in
memory-poisoning builds.
`oldsegnum` is `const`, so the address computed from it cannot change.
Lift the computation of `auto &children` out of the loop.
Reduce the scope of `biggest_val`, since it does not need to outlive the
loop.
gcc libstdc++ built with -D_GLIBCXX_DEBUG includes in
std::array::operator[] an assertion of the form:
```
assert(index < size());
```
The valptridx allow_end_construction constructor, when given a
completely full array, will call operator[](size()), which causes the
assertion to fail. Rework the constructor to compute an end iterator
without using operator[]. valptridx allow_end_construction expects that
the resulting iterator may be the end iterator and shall not be
dereferenced.
Introduce a helper to obtain both the magnitude of a vector and the
corresponding normalized vector. Use it to capture both values as const
when possible.
gcc-11.3.0 issues a -Wmaybe-uninitialized warning for `exit_side`.
Reorder the code to eliminate this warning. Also, fix a potential
out-of-bounds read if `matt_find_connect_side` returned `side_none`.
Before, this would lead to a read of `Side_opposite[side_none]` before
the test that `entry_side` is not `side_none`. Now, if
`matt_find_connect_side` returns `side_none`, the read of
`Side_opposite` is skipped and logic goes directly to finding a proper
exit side.
gcc-11.3.0 with -Og may issue a -Wmaybe-uninitialized warning for `w1`
because it fails to prove that every path sets the variable. Reorder
the logic to use a local lambda to ensure that every path assigns a
value.
These have been disabled since they were added in 2016, and the new HTTP
tracker they were meant to support was never put into service. Remove
the tests.
Fixes: 9a8bd1aecb ("Add disabled tests for curl/jsoncpp")