diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-06-05 05:45:16 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-06-05 05:45:16 +0000 |
commit | c0dc8f64a9adeab709cf22468d80afe97d7ad50d (patch) | |
tree | a1a5bdad2e6d81bad62113286c93e246c17ab12b /src/character.h | |
parent | 8ba31f366fc04228330e55c9ae48f2a6ba73760f (diff) | |
download | emacs-c0dc8f64a9adeab709cf22468d80afe97d7ad50d.tar.gz |
(MAKE_CHAR_MULTIBYTE): Check the arg is a (uni)byte.
Diffstat (limited to 'src/character.h')
-rw-r--r-- | src/character.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/character.h b/src/character.h index ce36cdf85ff..ae87b3885d9 100644 --- a/src/character.h +++ b/src/character.h @@ -95,7 +95,8 @@ extern char unibyte_has_multibyte_table[256]; /* If C is not ASCII, make it multibyte. It assumes C < 256. */ -#define MAKE_CHAR_MULTIBYTE(c) ((c) = unibyte_to_multibyte_table[(c)]) +#define MAKE_CHAR_MULTIBYTE(c) \ + (eassert ((c) >= 0 && (c) < 256), (c) = unibyte_to_multibyte_table[(c)]) /* This is the maximum byte length of multibyte form. */ #define MAX_MULTIBYTE_LENGTH 5 |