aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-10-02 01:42:34 +0200
committerjaseg <git@jaseg.de>2023-10-02 01:42:34 +0200
commit72cffd586a7d2cd20bd8256a920b2caac8c7db85 (patch)
tree98b1fd20f918030a03d7a84bc713208d8dc0ba3b /common
parentc8623eb4c6c1464ffd49e83126e66d71ba5bf862 (diff)
download8seg-72cffd586a7d2cd20bd8256a920b2caac8c7db85.tar.gz
8seg-72cffd586a7d2cd20bd8256a920b2caac8c7db85.tar.bz2
8seg-72cffd586a7d2cd20bd8256a920b2caac8c7db85.zip
Fix the nasty 8b/10b bug
Diffstat (limited to 'common')
-rw-r--r--common/8b10b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/8b10b.c b/common/8b10b.c
index 4908e1f..2f6e0f5 100644
--- a/common/8b10b.c
+++ b/common/8b10b.c
@@ -174,7 +174,7 @@ int xfr_8b10b_feed_bit(struct state_8b10b_dec *st, int bit) {
st->bit_ctr = 1;
for (int i=1; i<sizeof(k_sym_map)/sizeof(k_sym_map[0]); i++) {
- if (pattern == k_sym_map[i])
+ if (pattern == k_sym_map[i] || ((~pattern)&0x3ff) == k_sym_map[i])
return -i;
}