Skip to content

Commit

Permalink
Adding comment for magic number 4
Browse files Browse the repository at this point in the history
  • Loading branch information
blckmn committed Sep 29, 2024
1 parent a3ca766 commit fa3b4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/msp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; // $
Expand Down

0 comments on commit fa3b4ed

Please sign in to comment.