From 490e035f97ace73b3ee1c1033fb412b5d1433ce2 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 17:07:20 +1000 Subject: Fix some warnings found by closure-compiler --- src/defs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/defs.js') 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. -- cgit v1.2.3-54-g00ecf