mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
lua_misc.cpp: Fix compiler error 'overflow in implicit constant conversion'
- Set Lua api version to 1.26
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5a7de075a2
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-12-13 (Sun, 13 Dec 2015)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -118,12 +118,12 @@ int CLuaInstMisc::strSub(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
const char *s1;
|
||||
int pos=0, len=std::string::npos;
|
||||
size_t pos=0, len=std::string::npos;
|
||||
std::string ret="";
|
||||
s1 = luaL_checkstring(L, 2);
|
||||
pos = luaL_checkint(L, 3);
|
||||
if (numargs > 3)
|
||||
len = luaL_checkint(L, 4);
|
||||
len = (size_t)luaL_checkint(L, 4);
|
||||
|
||||
std::string str(s1);
|
||||
ret = str.substr(pos, len);
|
||||
|
Reference in New Issue
Block a user