Skip to content

Commit

Permalink
Filter bitLength is not always 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Jan 31, 2025
1 parent 1b3bf8b commit a45bc89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 2.2.0-draft/demo/TDTtranslator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,13 @@ class TDTtranslator {
case "filter": {
console.debug("Append the filter value of "+options['filter']);
if (outputLevel == "BINARY") {
finalOutputArray.push(TDTtranslator.prePad(parseInt(options['filter']).toString(2),"0",3));
let bitLength = 3;
for (let field of outputOption.field) {
if (field.name == 'filter') {
bitLength = field.bitLength;
}
}
finalOutputArray.push(TDTtranslator.prePad(parseInt(options['filter']).toString(2),"0",bitLength));
} else {
finalOutputArray.push(options['filter']);
}
Expand Down

0 comments on commit a45bc89

Please sign in to comment.