madden-franchise 3.2.3 → 3.2.5

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.
@@ -56,7 +56,11 @@ class FranchiseFileTable extends EventEmitter {
56
56
  updateBuffer() {
57
57
  // need to check table2 & table3 data first because it may change offsets of the legit records.
58
58
  let table2Data = this.strategy.getTable2BinaryData(this.table2Records, this.data.slice(this.header.table2StartIndex));
59
- let table3Data = this.strategy.getTable3BinaryData(this.table3Records, this.data.slice(this.header.table3StartIndex));
59
+ let table3Data = [];
60
+
61
+ if (this.header.table3StartIndex) {
62
+ table3Data = this.strategy.getTable3BinaryData(this.table3Records, this.data.slice(this.header.table3StartIndex));
63
+ }
60
64
 
61
65
  // update table2 length and table total length in table header (only if records have been read)
62
66
  if (this.recordsRead) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "madden-franchise",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Tools to read a madden franchise file and get data from it",
5
5
  "main": "FranchiseFile.js",
6
6
  "scripts": {
@@ -1,9 +1,10 @@
1
1
  const M20TableHeaderStrategy = require('../../common/header/m20/M20TableHeaderStrategy');
2
+ const M24TableHeaderStrategy = require('../../common/header/m24/M24TableHeaderStrategy');
2
3
  const FTCTableStrategy = require('../../common/table/FTCTableStrategy');
3
4
 
4
5
  let M20FTCTableStrategy = {};
5
6
 
6
- M20FTCTableStrategy.parseHeader = M20TableHeaderStrategy.parseHeader;
7
+ M20FTCTableStrategy.parseHeader = M24TableHeaderStrategy.parseHeader;
7
8
  M20FTCTableStrategy.parseHeaderAttributesFromSchema = M20TableHeaderStrategy.parseHeaderAttributesFromSchema;
8
9
 
9
10
  M20FTCTableStrategy.getTable2BinaryData = FTCTableStrategy.getTable2BinaryData;