Fix glyph caching
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 26 Nov 2011 16:53:45 +0000 (17:53 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 26 Nov 2011 16:53:45 +0000 (17:53 +0100)
We need to use memcmp() not memcpy() to compare two kmscon_char's.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/console_char.c

index b9a3c9a..079117e 100644 (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;