diff options
author | Leah Rowe <leah@libreboot.org> | 2023-06-08 12:32:17 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-06-08 12:35:36 +0100 |
commit | dee8f44b37ad9029ccc9c41a949cc834f537d07a (patch) | |
tree | 3c334a468a61d2441b6419e53b34e3fab749d30b /util | |
parent | f2822db9dd1e7787fe4209f5795d9595d435fecf (diff) |
util/spkmodem-recv: fix regression
The last bit wasn't being handled, *and* ascii_bit
wasn't being reduced at all.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 923694e8..7de911ec 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -65,7 +65,7 @@ handle_audio(void) return; } - if (!set_ascii_bit()) + if (set_ascii_bit() < 0) print_char(); sample_count = 0; for (int sample = 0; sample < SAMPLES_PER_FRAME; sample++) @@ -104,6 +104,7 @@ set_ascii_bit(void) print_stats(); if (freq_data < FREQ_DATA_THRESHOLD) ascii |= (1 << ascii_bit); + --ascii_bit; return ascii_bit; } |