Files
nethack/include/objects.h
Alex Smith ea023677c7 Work around MSVC false positive warning in price-tracking code
The MSVC warning assumes that any attempt to write - followed by an
unsigned number is an attempt to create a negative number (which
produces the wrong data type if you type, e.g., -2147483648).
However, it's also warning when an explicit U is given, e.g. in -1UL,
which is clearly not an attempt to express a negative value.

Suppress the warning by rewriting the number in question as (0UL-1UL)
with a binary rather than unary minus.
2026-03-18 23:27:54 +00:00

92 KiB