We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9543870 commit c1ac0beCopy full SHA for c1ac0be
src/from-minimap.js
@@ -89,9 +89,11 @@ const parseMarkerData = (buffer) => {
89
marker.description = utf8.decode(
90
descriptionBuffer.toString('binary')
91
);
92
- // The byte sequence 0x20 0x00 marks the end of the marker.
93
- console.assert(buffer[index++] === 0x20);
94
- console.assert(buffer[index++] === 0x00);
+ // The next few bytes are usually 0x20 0x00, marking the end of the marker.
+ // However, there are cases where the client produces a different format
+ // for reasons unknown.
95
+ // https://github.com/tibiamaps/tibia-maps-script/issues/21
96
+ while (buffer[index] !== undefined && buffer[index] !== 0x0A) index++;
97
98
// Create a sorted-by-key version of the marker object.
99
const sorted = {
0 commit comments