Don't cause over-/underflow on certain platforms

On mingw 32bit this comparison gives a warning about always being
true, which can only be the case if one of the constant actually
over/underflows.
This commit is contained in:
Moritz Bunkus 2013-12-07 13:32:22 +01:00
parent b0c4cb4701
commit a366eaa89e

View File

@ -99,7 +99,7 @@ uint64 EbmlSInteger::UpdateSize(bool bWithDefault, bool /* bForceRender */)
SetSize_(2);
} else if (Value <= 0x7FFFFF && Value >= (-0x800000)) {
SetSize_(3);
} else if (Value <= 0x7FFFFFFF && Value >= (-0x80000000)) {
} else if (Value <= EBML_PRETTYLONGINT(0x7FFFFFFF) && Value >= (EBML_PRETTYLONGINT(-0x80000000))) {
SetSize_(4);
} else if (Value <= EBML_PRETTYLONGINT(0x7FFFFFFFFF) &&
Value >= EBML_PRETTYLONGINT(-0x8000000000)) {