# HG changeset patch # User Kenichi Handa # Date 1141965463 0 # Node ID ec0a46fadd7eb126a1e09687a6eb78ca5ff09762 # Parent 1f998d77c7829251581fb033900c0955ba6eb3c7 (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix condition to terminate the loop. diff -r 1f998d77c782 -r ec0a46fadd7e src/coding.c --- a/src/coding.c Fri Mar 10 04:37:29 2006 +0000 +++ b/src/coding.c Fri Mar 10 04:37:43 2006 +0000 @@ -1996,24 +1996,24 @@ } while (0) -#define DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION(c) \ - do { \ - /* Emacs 20 style format for relative composition. */ \ - /* Store multibyte form of characters to be composed. */ \ - enum composition_method method = COMPOSITION_RELATIVE; \ - int components[MAX_COMPOSITION_COMPONENTS * 2 - 1]; \ - int *buf = components; \ - int i, j; \ - \ - src = src_base; \ - ONE_MORE_BYTE (c); /* skip 0x80 */ \ - for (i = 0; i < MAX_COMPOSITION_COMPONENTS; i++) \ - DECODE_EMACS_MULE_COMPOSITION_CHAR (buf); \ - if (i < 2) \ - goto invalid_code; \ - ADD_COMPOSITION_DATA (charbuf, i, method); \ - for (j = 0; j < i; j++) \ - *charbuf++ = components[j]; \ +#define DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION(c) \ + do { \ + /* Emacs 20 style format for relative composition. */ \ + /* Store multibyte form of characters to be composed. */ \ + enum composition_method method = COMPOSITION_RELATIVE; \ + int components[MAX_COMPOSITION_COMPONENTS * 2 - 1]; \ + int *buf = components; \ + int i, j; \ + \ + src = src_base; \ + ONE_MORE_BYTE (c); /* skip 0x80 */ \ + for (i = 0; *src >= 0xA0 && i < MAX_COMPOSITION_COMPONENTS; i++) \ + DECODE_EMACS_MULE_COMPOSITION_CHAR (buf); \ + if (i < 2) \ + goto invalid_code; \ + ADD_COMPOSITION_DATA (charbuf, i, method); \ + for (j = 0; j < i; j++) \ + *charbuf++ = components[j]; \ } while (0)