diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:51:16 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:51:16 +0000 |
commit | d31707357106d0b773285d355264e5bb9ee2db64 (patch) | |
tree | 9a7cbc8afc617802bb086c43ed0b07873a5fe694 | |
parent | 89a7ade0e845548f6cbc1af9250de7414b17b44a (diff) | |
download | mdk-d31707357106d0b773285d355264e5bb9ee2db64.tar.gz mdk-d31707357106d0b773285d355264e5bb9ee2db64.tar.bz2 |
bug fix.
-rw-r--r-- | mixlib/mix_types.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mixlib/mix_types.h b/mixlib/mix_types.h index e10f8c7..54509f3 100644 --- a/mixlib/mix_types.h +++ b/mixlib/mix_types.h @@ -65,8 +65,9 @@ typedef guint8 mix_char_t; #define MIX_CHAR_MAX 55 /* Conversions for mix_char_t's */ -#define mix_char_to_byte(mchar) mix_byte_new(mchar) -#define mix_byte_to_char(byte) ((mix_char_t)((byte) & MIX_CHAR_MAX)) +#define mix_char_new(l) (((l) < MIX_CHAR_MAX )? (l) : MIX_CHAR_MAX) +#define mix_char_to_byte(mchar) mix_byte_new (mchar) +#define mix_byte_to_char(byte) mix_char_new (byte) extern mix_char_t mix_ascii_to_char(guchar c); |