mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fixed-point values can use all 32-Q magnitude bits (#1085)
This commit is contained in:
@@ -1179,7 +1179,7 @@ static uint32_t readFractionalPart(uint32_t integer)
|
||||
precision = fixPrecision;
|
||||
}
|
||||
|
||||
if (integer >= ((uint64_t)1 << precision))
|
||||
if (integer >= ((uint64_t)1 << (32 - precision)))
|
||||
warning(WARNING_LARGE_CONSTANT, "Magnitude of fixed-point constant is too large\n");
|
||||
|
||||
// Cast to unsigned avoids undefined overflow behavior
|
||||
|
||||
Reference in New Issue
Block a user