diff options
author | Wohlstand <admin@wohlnet.ru> | 2025-03-24 13:35:20 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2025-03-24 13:35:20 +0300 |
commit | db850087a4222e0709269e666ddf8923a72977ab (patch) | |
tree | 6b39582ef6f1659ebd55e638016db5d62d54dd7b /src | |
parent | 0868e68e0ea879652dd8841fab1d569d78345755 (diff) | |
download | libADLMIDI-db850087a4222e0709269e666ddf8923a72977ab.tar.gz libADLMIDI-db850087a4222e0709269e666ddf8923a72977ab.tar.bz2 libADLMIDI-db850087a4222e0709269e666ddf8923a72977ab.zip |
ESFM: Fixed a dumb bug that broke the buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/chips/esfmu/esfm.c | 2 | ||||
-rw-r--r-- | src/chips/esfmu/esfm.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/chips/esfmu/esfm.c b/src/chips/esfmu/esfm.c index e645ee8..023a6ee 100644 --- a/src/chips/esfmu/esfm.c +++ b/src/chips/esfmu/esfm.c @@ -2161,7 +2161,7 @@ ESFM_reg_write_chan_idx(esfm_chip *chip, uint16_t reg) else { uint8_t reg_low = reg & 0xff; - esbool high = reg & 0x100; + esbool high = (reg & 0x100) != 0; esbool is_key_on_reg = reg_low >= 0xb0 && reg_low < 0xb9; if (is_key_on_reg) { diff --git a/src/chips/esfmu/esfm.h b/src/chips/esfmu/esfm.h index 5ea9607..0a1ff74 100644 --- a/src/chips/esfmu/esfm.h +++ b/src/chips/esfmu/esfm.h @@ -74,7 +74,7 @@ int16_t ESFM_get_channel_output_native(esfm_chip *chip, int channel_idx); /* These are fake types just for syntax sugar. */ /* Beware of their underlying types when reading/writing to them. */ -typedef int esbool; +typedef int8_t esbool; #define estrue 1 #define esfalse 0 typedef uint8_t flag; |