You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-27 06:23:53 +01:00
Fix empty RT exception
This commit is contained in:
@@ -168,17 +168,23 @@ rdsparser.register_ptyn(rds, callbacks.ptyn);
|
|||||||
rdsparser.register_ct(rds, callbacks.ct);
|
rdsparser.register_ct(rds, callbacks.ct);
|
||||||
|
|
||||||
const decode_unicode = function(string) {
|
const decode_unicode = function(string) {
|
||||||
let content = rdsparser.string_get_content(string);
|
|
||||||
let length = rdsparser.string_get_length(string);
|
let length = rdsparser.string_get_length(string);
|
||||||
let array = koffi.decode(content, koffi.array(unicode_type, length));
|
if (length) {
|
||||||
return String.fromCodePoint.apply(String, array);
|
let content = rdsparser.string_get_content(string);
|
||||||
|
let array = koffi.decode(content, koffi.array(unicode_type, length));
|
||||||
|
return String.fromCodePoint.apply(String, array);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const decode_errors = function(string) {
|
const decode_errors = function(string) {
|
||||||
let errors = rdsparser.string_get_errors(string);
|
|
||||||
let length = rdsparser.string_get_length(string);
|
let length = rdsparser.string_get_length(string);
|
||||||
let array = koffi.decode(errors, koffi.array('uint8_t', length));
|
if (length) {
|
||||||
return Uint8Array.from(array).toString();
|
let errors = rdsparser.string_get_errors(string);
|
||||||
|
let array = koffi.decode(errors, koffi.array('uint8_t', length));
|
||||||
|
return Uint8Array.from(array).toString();
|
||||||
|
}
|
||||||
|
return '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateInterval = 75;
|
const updateInterval = 75;
|
||||||
|
|||||||
Reference in New Issue
Block a user