diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-08 15:22:17 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-08 15:32:22 +1000 |
commit | 5cb00bbae4f1afb5cd476a637975dd9220898e15 (patch) | |
tree | e1559df7238aee4c3f8996efe0315394b6ccf9f6 /src | |
parent | a4cbe2f7cabe1dd4bb91c8e3909c53c0bd3dc44d (diff) | |
download | fengari-5cb00bbae4f1afb5cd476a637975dd9220898e15.tar.gz fengari-5cb00bbae4f1afb5cd476a637975dd9220898e15.tar.bz2 fengari-5cb00bbae4f1afb5cd476a637975dd9220898e15.zip |
src/lstring.js: Freeze strings to catch accidental modification
Diffstat (limited to 'src')
-rw-r--r-- | src/lstring.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lstring.js b/src/lstring.js index 34f988e..af434c6 100644 --- a/src/lstring.js +++ b/src/lstring.js @@ -13,6 +13,7 @@ const luaS_hash = function(str) { /* variant that takes ownership of array */ const luaS_bless = function(L, str) { + Object.freeze(str); return str; }; |