mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
lua:avoid segfault
Origin commit data
------------------
Branch: ni/coolstream
Commit: a1830a99fb
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-05-19 (Sun, 19 May 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -433,7 +433,7 @@ int CLuaInstMenu::MenuAddItem(lua_State *L)
|
|||||||
const char *val = lua_tostring(L, -2);
|
const char *val = lua_tostring(L, -2);
|
||||||
kext[j].key = atoi(key);
|
kext[j].key = atoi(key);
|
||||||
kext[j].value = NONEXISTANT_LOCALE;
|
kext[j].value = NONEXISTANT_LOCALE;
|
||||||
kext[j].valname = strdup(val);
|
kext[j].valname = strdup(val?val:"ERROR");
|
||||||
D->tofree.push_back((void *)kext[j].valname);
|
D->tofree.push_back((void *)kext[j].valname);
|
||||||
if (!strcmp(value.c_str(), kext[j].valname))
|
if (!strcmp(value.c_str(), kext[j].valname))
|
||||||
b->int_val = kext[j].key;
|
b->int_val = kext[j].key;
|
||||||
|
Reference in New Issue
Block a user