mirror of https://github.com/odrling/Aegisub
Fix min/max for lua intedit controls
Originally committed to SVN as r6523.
This commit is contained in:
parent
24fbf25882
commit
27144a7ef7
|
@ -285,10 +285,10 @@ namespace Automation4 {
|
||||||
IntEdit(lua_State *L)
|
IntEdit(lua_State *L)
|
||||||
: Edit(L)
|
: Edit(L)
|
||||||
, value(get_field(L, "value", 0))
|
, value(get_field(L, "value", 0))
|
||||||
, min(get_field(L, "min", 0))
|
, min(get_field(L, "min", INT_MIN))
|
||||||
, max(get_field(L, "max", 0))
|
, max(get_field(L, "max", INT_MAX))
|
||||||
{
|
{
|
||||||
if (min <= max) {
|
if (min >= max) {
|
||||||
max = INT_MAX;
|
max = INT_MAX;
|
||||||
min = INT_MIN;
|
min = INT_MIN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue