From b55b9f85db85737b365e32585542046b349c1f2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 13 Jul 2012 19:07:02 +0200 Subject: [PATCH] * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to memcpy. Fixes: debbugs:11907 --- src/ChangeLog | 5 +++++ src/nsmenu.m | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9161d4c40de..e9d2d7f7d37 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-07-13 Jan Djärv + + * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to + memcpy (Bug#11907). + 2012-07-13 Kalle Kankare (tiny change) * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo diff --git a/src/nsmenu.m b/src/nsmenu.m index 2cd626e131a..f3bd9dd3ecb 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -448,8 +448,8 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) break; if (n < 100) - memcpy (previous_strings[i/4], min (10, SBYTES (string) + 1), - SDATA (string)); + memcpy (previous_strings[i/4], SDATA (string), + min (10, SBYTES (string) + 1)); wv = xmalloc_widget_value (); wv->name = SSDATA (string); -- 2.39.2