Make cycle corruption check stricter
This commit is contained in:
parent
bd353a176a
commit
88a7ddc286
|
@ -155,7 +155,12 @@ static void check_weapon_reorder(array<ubyte, N> &w)
|
|||
{
|
||||
uint_fast32_t m = 0;
|
||||
range_for (auto i, w)
|
||||
m |= i == 255 ? 1 << N : 1 << i;
|
||||
if (i == 255)
|
||||
m |= 1 << N;
|
||||
else if (i < N - 1)
|
||||
m |= 1 << i;
|
||||
else
|
||||
break;
|
||||
if (m != ((1 << N) | ((1 << (N - 1)) - 1)))
|
||||
{
|
||||
w[0] = 255;
|
||||
|
|
Loading…
Reference in a new issue