First (dummy) entry of compose caches was not initialized and thus contained varying garbage.

This commit is contained in:
Matthias Hopf 2006-06-28 19:17:03 +02:00
parent b0edfb8df1
commit f442dcaa56

View file

@ -465,6 +465,12 @@ _XimWriteCachedDefaultTree(
if (! b->utf8 && ! (b->utf8 = Xmalloc (1)) )
return;
/* First entry is always unused */
memset (b->tree, 0, sizeof(DefTree));
b->mb[0] = 0;
b->wc[0] = 0;
b->utf8[0] = 0;
m = Xmalloc (msize);
m->id = XIM_CACHE_MAGIC;
m->version = XIM_CACHE_VERSION;