Ensure isValid is always set
This commit is contained in:
@ -18,6 +18,8 @@ exports.SLChemDataMessage = class SLChemDataMessage extends SLMessage {
|
|||||||
decode() {
|
decode() {
|
||||||
super.decode();
|
super.decode();
|
||||||
|
|
||||||
|
this.isValid = false;
|
||||||
|
|
||||||
let sentinel = this.readInt32LE();
|
let sentinel = this.readInt32LE();
|
||||||
if (sentinel === 42) {
|
if (sentinel === 42) {
|
||||||
this.isValid = true;
|
this.isValid = true;
|
||||||
|
Reference in New Issue
Block a user