diff --git a/source/Ox/js/Encoding.js b/source/Ox/js/Encoding.js index 926b107e..a0ae93fc 100644 --- a/source/Ox/js/Encoding.js +++ b/source/Ox/js/Encoding.js @@ -223,7 +223,9 @@ Ox.decodeDeflate = function(string, callback) { try { // Parse the first byte as number of bytes to chop at the end, // and the rest, without these bytes, as an UTF8-encoded string. - string = Ox.decodeUTF8(string.slice(1, -string.charCodeAt(0))); + string = Ox.decodeUTF8( + string.slice(1, -string.charCodeAt(0) || void 0) + ); } catch (e) { error(); }