aboutsummaryrefslogtreecommitdiff
path: root/src/defs.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 17:07:20 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 17:07:20 +1000
commit490e035f97ace73b3ee1c1033fb412b5d1433ce2 (patch)
tree8ec646741214c2a9db1f5e68a17a4a5f1c829edc /src/defs.js
parent84dfcea32ad517400e970b7cf978246367ec9e46 (diff)
downloadfengari-490e035f97ace73b3ee1c1033fb412b5d1433ce2.tar.gz
fengari-490e035f97ace73b3ee1c1033fb412b5d1433ce2.tar.bz2
fengari-490e035f97ace73b3ee1c1033fb412b5d1433ce2.zip
Fix some warnings found by closure-compiler
Diffstat (limited to 'src/defs.js')
-rw-r--r--src/defs.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/defs.js b/src/defs.js
index b979e03..d1b98d0 100644
--- a/src/defs.js
+++ b/src/defs.js
@@ -193,9 +193,8 @@ const to_luastring = function(str, cache, maxBytesToWrite) {
if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
return 0;
-
+
let outIdx = 0;
- let startIdx = 0;
let endIdx = maxBytesToWrite - 1; // -1 for string null terminator.
for (let i = 0; i < str.length; ++i) {
// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.