---
 src/connection.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index 8497670..58b150b 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -486,12 +486,12 @@ wl_closure_vmarshal(struct wl_object *sender,
                                goto err;
                        *p++ = length;
 
-                       if (length > 0)
+                       if (length > 0) {
+                               memcpy(p, s, length);
                                *sp = (const char *) p;
-                       else
+                       } else
                                *sp = NULL;
 
-                       memcpy(p, s, length);
                        memset((char *) p + length, 0, aligned - length);
                        p += aligned / sizeof *p;
                        break;
-- 
1.7.12.2

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to