diff --git a/source/funkin/backend/system/net/Socket.hx b/source/funkin/backend/system/net/Socket.hx index 4aefdabe..19ebf9a1 100644 --- a/source/funkin/backend/system/net/Socket.hx +++ b/source/funkin/backend/system/net/Socket.hx @@ -18,7 +18,7 @@ class Socket implements IFlxDestroyable { public function read():String { try { - return this.socket.input.readUntil(('\n').charCodeAt(0)).replace("\\n", "\n"); + return this.socket.input.readUntil('\n'.code).replace("\\n", "\n"); } catch(e) { } diff --git a/source/funkin/backend/utils/ZipUtil.hx b/source/funkin/backend/utils/ZipUtil.hx index eef06a6d..b90aecb4 100644 --- a/source/funkin/backend/utils/ZipUtil.hx +++ b/source/funkin/backend/utils/ZipUtil.hx @@ -135,12 +135,12 @@ class ZipUtil { if (prog == null) prog = new ZipProgress(); try { - var curPath:Array = ['$path']; + var curPath:Array = [path]; var destPath:Array = []; if (prefix != "") { prefix = prefix.replace("\\", "/"); - while(prefix.charAt(0) == "/") prefix = prefix.substr(1); - while(prefix.charAt(prefix.length-1) == "/") prefix = prefix.substr(0, prefix.length-1); + while(prefix.charCodeAt(0) == "/".code) prefix = prefix.substr(1); + while(prefix.charCodeAt(prefix.length-1) == "/".code) prefix = prefix.substr(0, prefix.length-1); destPath.push(prefix); } @@ -160,7 +160,7 @@ class ZipUtil { } else { // is file, put it in the list var zipPath = '$zipPath/$e'; - while(zipPath.charAt(0) == "/") zipPath = zipPath.substr(1); + while(zipPath.charCodeAt(0) == "/".code) zipPath = zipPath.substr(1); files.push(new StrNameLabel('$path/$e', zipPath)); } }