From fa3b4ed8327bab391df917681973a7f743628f7a Mon Sep 17 00:00:00 2001 From: blckmn Date: Mon, 30 Sep 2024 08:00:17 +1000 Subject: [PATCH] Adding comment for magic number 4 --- src/js/msp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/msp.js b/src/js/msp.js index 2c605168af..2841bb5bda 100644 --- a/src/js/msp.js +++ b/src/js/msp.js @@ -344,7 +344,7 @@ const MSP = { encode_message_cli(str) { const data = Array.from(str, c => c.charCodeAt(0)); const dataLength = data ? data.length : 0; - const bufferSize = dataLength + 4; + const bufferSize = dataLength + 4; // 4 bytes for protocol overhead const bufferOut = new ArrayBuffer(bufferSize); const bufView = new Uint8Array(bufferOut); bufView[0] = this.symbols.BEGIN; // $