mirror of https://github.com/odrling/Aegisub
Apparently not all platforms agree on providing MININT and MAXINT constants. Work around it by calculating those values ourselves.
Originally committed to SVN as r2917.
This commit is contained in:
parent
f425b58017
commit
ae988ed37b
|
@ -332,8 +332,11 @@ namespace Automation4 {
|
||||||
nospin:
|
nospin:
|
||||||
if (!hasspin) {
|
if (!hasspin) {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
min = MININT;
|
// Assuming we are using a binary machine with finite word length,
|
||||||
max = MAXINT;
|
// that represents integers as two's complement, this will get us
|
||||||
|
// the largest and smallest values representable by the int type.
|
||||||
|
max = (int)((~(unsigned int)0) >> 1);
|
||||||
|
min = ~max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue