teeworlds 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@ function unpackInt(pSrc) {
18
18
  exports.unpackInt = unpackInt;
19
19
  function unpackString(pSrc) {
20
20
  var result = pSrc.slice(0, pSrc.indexOf(0));
21
- pSrc = pSrc.slice(pSrc.indexOf(0), pSrc.length);
21
+ pSrc = pSrc.slice(pSrc.indexOf(0) + 1, pSrc.length);
22
22
  return { result: decoder.decode(new Uint8Array(result)), remaining: pSrc };
23
23
  }
24
24
  exports.unpackString = unpackString;
@@ -20,7 +20,7 @@ export function unpackInt(pSrc: number[]): {result: number, remaining: number[]}
20
20
  }
21
21
  export function unpackString(pSrc: number[]): {result: string, remaining: number[]} {
22
22
  var result = pSrc.slice(0, pSrc.indexOf(0))
23
- pSrc = pSrc.slice(pSrc.indexOf(0), pSrc.length)
23
+ pSrc = pSrc.slice(pSrc.indexOf(0) + 1, pSrc.length)
24
24
  return {result: decoder.decode(new Uint8Array(result)), remaining: pSrc}
25
25
  }
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teeworlds",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "Library for (ingame) teeworlds bots.",
5
5
  "license": "MIT",
6
6
  "main": "index.js",