changeset 90153:e29d4e885eca

(load_charset_map_from_vector): Fix for the first iteration.
author Kenichi Handa <handa@m17n.org>
date Mon, 25 Apr 2005 06:53:27 +0000
parents 07b2c6525e40
children 9f0c11c053f8
files src/charset.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Fri Apr 22 04:56:28 2005 +0000
+++ b/src/charset.c	Mon Apr 25 06:53:27 2005 +0000
@@ -505,7 +505,7 @@
       if (from < min_code || to > max_code || from > to || c > MAX_CHAR)
 	continue;
 
-      if ((n_entries % 0x10000) == 0)
+      if (n_entries > 0 && (n_entries % 0x10000) == 0)
 	{
 	  entries->next = ((struct charset_map_entries *)
 			   alloca (sizeof (struct charset_map_entries)));