Fix glyph caching

We need to use memcmp() not memcpy() to compare two kmscon_char's.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann committed 2011-11-26 17:53:45 +01:00
1 parent c4d6c554fd
commit 9e2c14a7ca
1 file changed
+1 -2
+1 -2
View File
@@ -212,7 +212,7 @@ static gboolean kmscon_char_equal(gconstpointer a, gconstpointer b)
if (ch1->len != ch2->len)
return FALSE;
return (memcpy(ch1->buf, ch2->buf, ch1->len) == 0);
return (memcmp(ch1->buf, ch2->buf, ch1->len) == 0);
}
/*
@@ -463,7 +463,6 @@ static int kmscon_font_lookup(struct kmscon_font *font,
g_hash_table_insert(font->glyphs, ch, glyph);
}
kmscon_glyph_ref(glyph);
*out = glyph;
return 0;