Add tests for packet decode/encode (and fix some bugs found by the tests!)

This commit is contained in:
Casper Warden
2017-12-20 17:07:10 +00:00
parent 231eff9e7f
commit 493b843b4d
316 changed files with 7809 additions and 238 deletions

View File

@@ -10,7 +10,7 @@ class ScriptDataRequestMessage {
this.id = Message_1.Message.ScriptDataRequest;
}
getSize() {
return ((this.calculateVarVarSize(this.DataBlock, 'Request', 2) + 9) * this.DataBlock.length) + 1;
return this.calculateVarVarSize(this.DataBlock, 'Request', 2) + ((9) * this.DataBlock.length) + 1;
}
calculateVarVarSize(block, paramName, extraPerVar) {
let size = 0;