summaryrefslogtreecommitdiff
path: root/src/lstring.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-11-12 16:01:51 +1100
committerdaurnimator <quae@daurnimator.com>2017-11-12 16:22:28 +1100
commit5812c42e7bb680592e60454b003f228dfe95869a (patch)
treeb9aecff7655d6089a77bfabd45f81b2b9dc1c528 /src/lstring.js
parent542c431989bff3fc3a6687f182a8c61a7861efd9 (diff)
downloadfengari-5812c42e7bb680592e60454b003f228dfe95869a.tar.gz
fengari-5812c42e7bb680592e60454b003f228dfe95869a.tar.bz2
fengari-5812c42e7bb680592e60454b003f228dfe95869a.zip
Add internal function defs.luastring_cmp for string equality checks
Diffstat (limited to 'src/lstring.js')
-rw-r--r--src/lstring.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstring.js b/src/lstring.js
index 185582b..c85e5b2 100644
--- a/src/lstring.js
+++ b/src/lstring.js
@@ -24,7 +24,7 @@ class TString {
const luaS_eqlngstr = function(a, b) {
assert(a instanceof TString);
assert(b instanceof TString);
- return a == b || (a.realstring.length == b.realstring.length && a.realstring.join() == b.realstring.join());
+ return a == b || defs.luastring_cmp(a.realstring, b.realstring);
};
/* converts strings (arrays) to a consistent map key