Fixes after feedback
parent
6334e1a3e9
commit
c22b69e7b5
13
js/msp.js
13
js/msp.js
|
@ -737,13 +737,9 @@ var MSP = {
|
|||
case MSP_codes.MSP_NAME:
|
||||
var offset = 0;
|
||||
var name = '';
|
||||
var letter;
|
||||
do {
|
||||
letter = String.fromCharCode(data.getUint8(offset++));
|
||||
if (letter != '\0') {
|
||||
name += letter;
|
||||
}
|
||||
} while (letter != '\0');
|
||||
while (offset<data.byteLength) {
|
||||
name += String.fromCharCode(data.getUint8(offset++));;
|
||||
}
|
||||
CONFIG.name = name;
|
||||
break;
|
||||
|
||||
|
@ -1510,6 +1506,9 @@ MSP.crunch = function (code) {
|
|||
for (var i = 0; i<CONFIG.name.length; i++) {
|
||||
buffer.push(CONFIG.name.charCodeAt(i));
|
||||
}
|
||||
if (!buffer.length) {
|
||||
buffer.push('-'.charCodeAt(0));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue