summaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-01-08 12:06:55 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-01-08 12:06:55 -0200
commit0730a56d38241d70f49cc6fe650c4995fe7dcb2c (patch)
treedbd665c83f0cefc5dd162e2fe8bf2c290955472c /lstring.c
parenteecc1491f39947d575fea42ec99864d9625d6e87 (diff)
downloadlua-github-0730a56d38241d70f49cc6fe650c4995fe7dcb2c.tar.gz
detail
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstring.c b/lstring.c
index 86e3e0e5..48fd1414 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstring.c,v 2.24 2012/05/11 14:14:42 roberto Exp roberto $
+** $Id: lstring.c,v 2.25 2012/10/02 17:41:50 roberto Exp roberto $
** String table (keeps all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -139,7 +139,7 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) {
o = gch(o)->next) {
TString *ts = rawgco2ts(o);
if (h == ts->tsv.hash &&
- ts->tsv.len == l &&
+ l == ts->tsv.len &&
(memcmp(str, getstr(ts), l * sizeof(char)) == 0)) {
if (isdead(G(L), o)) /* string is dead (but was not collected yet)? */
changewhite(o); /* resurrect it */