Remove useless newlines.

This commit is contained in:
bʰedoh₂ swé 2024-12-17 02:01:33 +05:00
parent 41a5bba935
commit 829e17a57c

View File

@ -47,9 +47,9 @@ let srv = net.createServer(function(socket: net.Socket) {
socket.end() socket.end()
return; return;
case 0x31: case 0x31:
let msize = 0 let msize = 1
for (const i of messages) { for (const i of messages) {
msize += i.toString().length + 1; msize += i.toString().length;
} }
socket.write(String(msize)); socket.write(String(msize));
socket.end(); socket.end();
@ -59,8 +59,9 @@ let srv = net.createServer(function(socket: net.Socket) {
console.log(addr.address + ", got messages request."); console.log(addr.address + ", got messages request.");
let str = ""; let str = "";
for (const i of messages) { for (const i of messages) {
str += i.toString() + "\n"; str += i.toString();
} }
str += "\n"
console.log("Sending " + str.length + " to " + addr.address); console.log("Sending " + str.length + " to " + addr.address);
socket.write(str); socket.write(str);
return; return;