[haiku-commits] r39957 - haiku/trunk/src/kits/shared

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Dec 2010 00:49:15 +0100 (CET)

Author: mmlr
Date: 2010-12-27 00:49:15 +0100 (Mon, 27 Dec 2010)
New Revision: 39957
Changeset: http://dev.haiku-os.org/changeset/39957

Modified:
   haiku/trunk/src/kits/shared/Keymap.cpp
Log:
CID 8115: Fix wrong size parameter to memcmp() which lead to a broken equality
operator.


Modified: haiku/trunk/src/kits/shared/Keymap.cpp
===================================================================
--- haiku/trunk/src/kits/shared/Keymap.cpp      2010-12-26 23:22:43 UTC (rev 
39956)
+++ haiku/trunk/src/kits/shared/Keymap.cpp      2010-12-26 23:49:15 UTC (rev 
39957)
@@ -434,7 +434,7 @@
 {
        return fCharsSize == other.fCharsSize
                && !memcmp(&fKeys, &other.fKeys, sizeof(fKeys))
-               && !memcmp(fChars, other.fChars, sizeof(fChars));
+               && !memcmp(fChars, other.fChars, fCharsSize);
 }
 
 


Other related posts:

  • » [haiku-commits] r39957 - haiku/trunk/src/kits/shared - mmlr