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 | 8ae21156660f99f93611256b9d49bfbf9c0949c3 (patch) | |
tree | 1082292503d7be00505b46ae893e1b23d96ee7f9 | |
parent | 0888d4998dfd4812195dcd9adac74fe4c005daaf (diff) | |
download | mdk-8ae21156660f99f93611256b9d49bfbf9c0949c3.tar.gz mdk-8ae21156660f99f93611256b9d49bfbf9c0949c3.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); |