From bcde8c870983c1ff50271ee5aca88c8ef9f72783 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Sun, 2 Mar 2025 20:31:25 +0100 Subject: [PATCH] Small changes --- source/funkin/backend/system/net/Socket.hx | 2 +- source/funkin/backend/utils/ZipUtil.hx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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)); } }