diff options
Diffstat (limited to 'girepository/gthash.c')
-rw-r--r-- | girepository/gthash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/girepository/gthash.c b/girepository/gthash.c index b50ea6f0..831c87e9 100644 --- a/girepository/gthash.c +++ b/girepository/gthash.c @@ -29,7 +29,7 @@ #define ALIGN_VALUE(this, boundary) \ (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1))) -/** +/* * String hashing in the typelib. We have a set of static (fixed) strings, * and given one, we need to find its index number. This problem is perfect * hashing: http://en.wikipedia.org/wiki/Perfect_hashing @@ -158,6 +158,8 @@ _gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint g_assert (len >= builder->packed_size); g_assert ((((unsigned long)mem) & 0x3) == 0); + memset (mem, 0, len); + *((guint32*) mem) = builder->dirmap_offset; packed_mem = (guint8*)(mem + sizeof(guint32)); cmph_pack (builder->c, packed_mem); |