mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-17 08:55:05 -04:00
Fixes an error in the presettable counter; closes #374
This commit is contained in:
parent
832de23263
commit
1107b1e778
@ -64,9 +64,10 @@ public class CounterPreset extends Node implements Element {
|
||||
this.out = new ObservableValue("out", bits).setPinDescription(DESCRIPTION);
|
||||
this.ovf = new ObservableValue("ovf", 1).setPinDescription(DESCRIPTION);
|
||||
|
||||
long m = attributes.get(Keys.MAX_VALUE);
|
||||
long mask = Bits.mask(bits);
|
||||
long m = attributes.get(Keys.MAX_VALUE) & mask;
|
||||
if (m == 0)
|
||||
m = Bits.mask(bits);
|
||||
m = mask;
|
||||
maxValue = m;
|
||||
|
||||
probe = attributes.get(Keys.VALUE_IS_PROBE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user