Fixed bug: broken GUI sample #86

Fixed bug: broken GUI sample #86, Reported by @eogloblin, in 2023-10-26
This commit is contained in:
Namhyeon Go 2023-10-26 18:59:01 +09:00 committed by GitHub
parent 1a460afaa2
commit 9ff1f617b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,10 +399,12 @@ function PipeIPC() {
return isFlushed;
};
// Fixed bug: broken GUI sample #86, Reported by @eogloblin, in 2023-10-26
// Reference #1: https://gist.github.com/antic183/619f42b559b78028d1fe9e7ae8a1352d
this._read = function(fh) {
try {
return (function(s) {
return s.length > 1 ? s.substring(1) : '';
return (s.length > 1 && s.charCodeAt(0) === 0xFEFF) ? s.substring(1) : s;
})(fh.ReadAll());
} catch (e) {
//console.log(e.message);
@ -509,7 +511,7 @@ exports.adSaveCreateNotExist = adSaveCreateNotExist;
exports.adSaveCreateOverWrite = adSaveCreateOverWrite;
exports.adModeReadWrite = adModeReadWrite;
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.20";
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.21";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = require;