From cd7155635d5a3b49feb42058151dffa4e341213f Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 26 Dec 2010 23:49:15 +0000 Subject: [PATCH] CID 8115: Fix wrong size parameter to memcmp() which lead to a broken equality operator. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39957 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/shared/Keymap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/shared/Keymap.cpp b/src/kits/shared/Keymap.cpp index d6827c2f93..fe6fe970ae 100644 --- a/src/kits/shared/Keymap.cpp +++ b/src/kits/shared/Keymap.cpp @@ -434,7 +434,7 @@ BKeymap::operator==(const BKeymap& other) const { return fCharsSize == other.fCharsSize && !memcmp(&fKeys, &other.fKeys, sizeof(fKeys)) - && !memcmp(fChars, other.fChars, sizeof(fChars)); + && !memcmp(fChars, other.fChars, fCharsSize); }