Added max MSP buffer limit

10.3.x-maintenance
KiteAnton 2016-07-16 10:08:20 +02:00
parent 31384fa642
commit 4d3346ea63
1 changed files with 2 additions and 1 deletions

View File

@ -1503,7 +1503,8 @@ MSP.crunch = function (code) {
break; break;
case MSP_codes.MSP_SET_NAME: case MSP_codes.MSP_SET_NAME:
for (var i = 0; i<CONFIG.name.length; i++) { var MSP_BUFFER_SIZE = 64;
for (var i = 0; i<CONFIG.name.length && i<MSP_BUFFER_SIZE; i++) {
buffer.push(CONFIG.name.charCodeAt(i)); buffer.push(CONFIG.name.charCodeAt(i));
} }
break; break;