Fix total number of bytes in sanity check

This commit is contained in:
zontreck 2024-08-29 14:48:39 -07:00
parent a7e448f6b4
commit a7c1daf806
3 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
class Constants {
static const VERSION = "1.2.082924+1124";
static const VERSION = "1.2.082924+1447";
}

View file

@ -31,7 +31,7 @@ class PacketServer {
var oldPos = layer.currentPosition;
layer.resetPosition();
int pktTotalExpected = layer.readLong();
if (pktTotalExpected <= layer.length) {
if (pktTotalExpected + 8 <= layer.length) {
// Allow Processing
} else {
layer.restorePosition(oldPos);
@ -184,7 +184,7 @@ class PacketClient {
var oldPos = reply.currentPosition;
reply.resetPosition();
int lenOfReply = reply.readLong();
if (lenOfReply <= reply.length) {
if (lenOfReply + 8 <= reply.length) {
// We can now process the data
} else {
reply.restorePosition(oldPos);

View file

@ -1,6 +1,6 @@
name: libac_dart
description: "Aria's Creations code library"
version: 1.2.082924+1124
version: 1.2.082924+1447
homepage: "https://zontreck.com"