Fix min/max for lua intedit controls

Originally committed to SVN as r6523.
This commit is contained in:
Thomas Goyne 2012-02-28 01:23:15 +00:00
parent 24fbf25882
commit 27144a7ef7
1 changed files with 3 additions and 3 deletions

View File

@ -285,10 +285,10 @@ namespace Automation4 {
IntEdit(lua_State *L)
: Edit(L)
, value(get_field(L, "value", 0))
, min(get_field(L, "min", 0))
, max(get_field(L, "max", 0))
, min(get_field(L, "min", INT_MIN))
, max(get_field(L, "max", INT_MAX))
{
if (min <= max) {
if (min >= max) {
max = INT_MAX;
min = INT_MIN;
}