This commit is contained in:
Jacek Jendrzej
2016-08-20 09:54:12 +02:00
parent a648daba75
commit 27ddf8935d

View File

@@ -140,14 +140,14 @@ int CLuaInstCCText::CCTextNew(lua_State *L)
CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL; CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL;
if(pw){ if(pw){
if(dx == -1) if(dx < 1)
dx = pw->getHeight(); dx = pw->getHeight();
if(dy == -1) if(dy < 1)
dy = pw->getWidth(); dy = pw->getWidth();
} }
if(dx == -1) if(dx < 1)
dx = 100; dx = 100;
if(dy == -1) if(dy < 1)
dy = 100; dy = 100;
CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *)); CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *));