Fix WI joiner/mather not being at the start

This commit is contained in:
Wolfsblvt 2024-09-16 05:18:37 +02:00
parent 11ff19a161
commit c45e42ce7d
1 changed files with 3 additions and 2 deletions

View File

@ -217,8 +217,9 @@ class WorldInfoBuffer {
depth = MAX_SCAN_DEPTH;
}
const JOINER = '\n\x01';
let result = this.#depthBuffer.slice(this.#startDepth, depth).join(JOINER);
const MATCHER = '\x01';
const JOINER = '\n' + MATCHER;
let result = MATCHER + this.#depthBuffer.slice(this.#startDepth, depth).join(JOINER);
if (this.#injectBuffer.length > 0) {
result += JOINER + this.#injectBuffer.join(JOINER);