Fix crash in inputbox when called with wrong arguments (negative precision for number input). Tweaked colors of icons
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1435 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
a8d7f0d01e
commit
ab0d336751
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 1.4 KiB |
@ -577,6 +577,9 @@ int L_InputBox(lua_State* L)
|
||||
LUA_ARG_NUMBER(setting*args_per_setting+6, "inputbox", decimal_places[setting], -15.0, 15.0);
|
||||
if (decimal_places[setting]>15)
|
||||
decimal_places[setting]=15;
|
||||
if (min_value[setting]!=0 || min_value[setting]!=1)
|
||||
if (decimal_places[setting]<0)
|
||||
decimal_places[setting]=0;
|
||||
// Keep current value in range
|
||||
if (decimal_places[setting]>=0)
|
||||
current_value[setting] = Fround(current_value[setting], decimal_places[setting]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user