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
commit15090143d051e00b95b80ee1d3fe9539ccf025de (patch)
treeb21626baeb494c0415bb3a6bfd9221091c3060b1
parentRemove discord login config (diff)
downloadserver-15090143d051e00b95b80ee1d3fe9539ccf025de.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());
 	}