Skip to content

Commit

Permalink
Bugfix:
Browse files Browse the repository at this point in the history
 - VariableDatumLength is the number of bits, not bytes in the variableDatum
  • Loading branch information
keckxde committed Nov 27, 2019
1 parent 2811fb0 commit 202e085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/dis7/VariableDatum.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ dis.VariableDatum = function()
dis.VariableDatum.prototype.initFromBinary = function(inputStream)
{
this.variableDatumID = inputStream.readUInt();
this.variableDatumLength = inputStream.readUInt() >> 3; //@check: Somehow this needs to be shifted to have correct length
for(var idx = 0; idx < this.variableDatumLength; idx++)
this.variableDatumLength = inputStream.readUInt();
for(var idx = 0; idx < this.variableDatumLength/8; idx++) //take care: the variableDatumLength is in bits (=> divide by 8 for bytes)
{
var anX = new dis.OneByteChunk();
anX.initFromBinary(inputStream);
Expand Down

0 comments on commit 202e085

Please # to comment.