Skip to content

Commit bcde8c8

Browse files
committed
Small changes
1 parent 1af6931 commit bcde8c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/funkin/backend/system/net/Socket.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Socket implements IFlxDestroyable {
1818

1919
public function read():String {
2020
try {
21-
return this.socket.input.readUntil(('\n').charCodeAt(0)).replace("\\n", "\n");
21+
return this.socket.input.readUntil('\n'.code).replace("\\n", "\n");
2222
} catch(e) {
2323

2424
}

source/funkin/backend/utils/ZipUtil.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ class ZipUtil {
135135
if (prog == null) prog = new ZipProgress();
136136

137137
try {
138-
var curPath:Array<String> = ['$path'];
138+
var curPath:Array<String> = [path];
139139
var destPath:Array<String> = [];
140140
if (prefix != "") {
141141
prefix = prefix.replace("\\", "/");
142-
while(prefix.charAt(0) == "/") prefix = prefix.substr(1);
143-
while(prefix.charAt(prefix.length-1) == "/") prefix = prefix.substr(0, prefix.length-1);
142+
while(prefix.charCodeAt(0) == "/".code) prefix = prefix.substr(1);
143+
while(prefix.charCodeAt(prefix.length-1) == "/".code) prefix = prefix.substr(0, prefix.length-1);
144144
destPath.push(prefix);
145145
}
146146

@@ -160,7 +160,7 @@ class ZipUtil {
160160
} else {
161161
// is file, put it in the list
162162
var zipPath = '$zipPath/$e';
163-
while(zipPath.charAt(0) == "/") zipPath = zipPath.substr(1);
163+
while(zipPath.charCodeAt(0) == "/".code) zipPath = zipPath.substr(1);
164164
files.push(new StrNameLabel('$path/$e', zipPath));
165165
}
166166
}

0 commit comments

Comments
 (0)