This commit is contained in:
starplanet 2024-05-03 11:00:44 +01:00 committed by GitHub
commit edfec2f5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -45,11 +45,12 @@ class ToDecimal extends Operation {
* @returns {string}
*/
run(input, args) {
input = new Uint8Array(input);
const delim = Utils.charRep(args[0]),
signed = args[1];
if (signed) {
input = input.map(v => v > 0x7F ? v - 0xFF - 1 : v);
input = new Int8Array(input);
} else {
input = new Uint8Array(input);
}
return input.join(delim);
}