Replaced strncat with dmStrlCat

This commit is contained in:
Alexey Gulev 2019-09-24 09:48:03 +02:00
parent af80e05796
commit 2c23e2f45a

View File

@ -42,14 +42,14 @@ char* IAP_List_CreateBuffer(lua_State* L)
lua_pushnil(L); lua_pushnil(L);
while (lua_next(L, 1) != 0) { while (lua_next(L, 1) != 0) {
if (i > 0) { if (i > 0) {
strncat(buf, ",", length+1); dmStrlCat(buf, ",", length+1);
} }
const char* p = lua_tostring(L, -1); const char* p = lua_tostring(L, -1);
if(!p) if(!p)
{ {
luaL_error(L, "IAP: Failed to get value (string) from table"); luaL_error(L, "IAP: Failed to get value (string) from table");
} }
strncat(buf, p, length+1); dmStrlCat(buf, p, length+1);
lua_pop(L, 1); lua_pop(L, 1);
++i; ++i;
} }