CLuaInstCCText: try to fix return value of CCTextGetLines()

Init was missing.
This commit is contained in:
2017-06-15 01:01:55 +02:00
parent ec83549e50
commit 5b12952d8b
2 changed files with 2 additions and 1 deletions

View File

@@ -4,4 +4,4 @@
* to luainstance.h changes * to luainstance.h changes
*/ */
#define LUA_API_VERSION_MAJOR 1 #define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 75 #define LUA_API_VERSION_MINOR 76

View File

@@ -229,6 +229,7 @@ int CLuaInstCCText::CCTextGetLines(lua_State *L)
} }
else { else {
CTextBox* ctb = D->ct->getCTextBoxObject(); CTextBox* ctb = D->ct->getCTextBoxObject();
D->ct->initCCText();
if (ctb) if (ctb)
lines = (lua_Integer)ctb->getLines(); lines = (lua_Integer)ctb->getLines();
} }