Skip to content

Commit 991c1b5

Browse files
committed
Keyboard.java.patch: Hotfix for Logisim bug that discards the first character of some stdin lines
1 parent dbeebaa commit 991c1b5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Keyboard.java.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
256a257,266
2+
> }
3+
>
4+
> // Ensure that at least one full clock tick will elapse before propagate() dequeue()s the
5+
> // first character. This is a workaround for the -tty tty command-line switch losing the
6+
> // first character of some lines of input.
7+
> Object trigger = state.getAttributeValue(StdAttr.EDGE_TRIGGER);
8+
> if (trigger == StdAttr.TRIG_FALLING) {
9+
> keyboardData.setLastClock(Value.FALSE);
10+
> } else {
11+
> keyboardData.setLastClock(Value.TRUE);

0 commit comments

Comments
 (0)