summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 19:50:30 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 19:50:30 +1100
commit9adce764e828ae4276840d316eabe8b2e6996385 (patch)
treeb2b2cf4f87ada47ce3930148eb92e3efc65a3a14
parentRemove discord login config (diff)
downloadserver-9adce764e828ae4276840d316eabe8b2e6996385.tar.xz
Add comment for 123 magic number
-rw-r--r--src/gateway/events/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index 12b6f8b9..a88495f6 100644
--- a/src/gateway/events/Message.ts
+++ b/src/gateway/events/Message.ts
@@ -16,7 +16,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
 	// TODO: compression
 	var data: Payload;
 
-	if ((buffer instanceof Buffer && buffer[0] === 123) ||
+	if ((buffer instanceof Buffer && buffer[0] === 123) ||	// ASCII 123 = `{`. Bad check for JSON
 		(typeof buffer === "string")) {
 		data = bigIntJson.parse(buffer.toString());
 	}