Teleports, Asset upload / download, Restructure stuff, Fix varlength read bug, BVH parser, agent initial appearance and animation glitches, LLSD + Caps + Event queue

This commit is contained in:
Casper Warden
2017-11-30 04:11:59 +00:00
parent fc6d77a893
commit d0658438b9
247 changed files with 3470 additions and 459 deletions

View File

@@ -54,7 +54,7 @@ export class Zerocoder
}
return newBuf;
}
static Decode(buf: Buffer, start: number, end: number): Buffer
static Decode(buf: Buffer, start: number, end: number, tail: number): Buffer
{
// First, run through the data and calculate how many bytes have been compressed
let bytes = 0;
@@ -67,7 +67,7 @@ export class Zerocoder
// Minus two bytes for the overhead
bytes += buf.readUInt8(i) - 2;
}
else if (buf[i] === 0)
else if (buf[i] === 0 && i <= (end - tail))
{
zero = true;
}
@@ -88,7 +88,7 @@ export class Zerocoder
newBuf[newBufIndex++] = 0;
}
}
else if (buf[i] === 0)
else if (buf[i] === 0 && i <= (end - tail))
{
zero = true;
}