mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
bug fix - c23f705349
This commit is contained in:
parent
2592aeb85e
commit
d481042480
2 changed files with 6 additions and 0 deletions
|
@ -131,6 +131,8 @@ TString *luaX_newstring(LexState *ls, const char *str, size_t l) {
|
||||||
table has no metatable, so it does not need to invalidate cache */
|
table has no metatable, so it does not need to invalidate cache */
|
||||||
setbvalue(o, 1); /* t[string] = true */
|
setbvalue(o, 1); /* t[string] = true */
|
||||||
luaC_checkGC(L);
|
luaC_checkGC(L);
|
||||||
|
} else { /* string already present */
|
||||||
|
ts = rawtsvalue(keyfromval(o)); /* re-use value previously stored */
|
||||||
}
|
}
|
||||||
L->top--; /* remove string from stack */
|
L->top--; /* remove string from stack */
|
||||||
return ts;
|
return ts;
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
|
|
||||||
#define invalidateTMcache(t) ((t)->flags = 0)
|
#define invalidateTMcache(t) ((t)->flags = 0)
|
||||||
|
|
||||||
|
/* returns the key, given the value of a table entry */
|
||||||
|
#define keyfromval(v) \
|
||||||
|
(gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))
|
||||||
|
|
||||||
|
|
||||||
LUAI_FUNC const TValue *luaH_getint(Table *t, int key);
|
LUAI_FUNC const TValue *luaH_getint(Table *t, int key);
|
||||||
LUAI_FUNC void luaH_setint(lua_State *L, Table *t, int key, TValue *value);
|
LUAI_FUNC void luaH_setint(lua_State *L, Table *t, int key, TValue *value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue