Fix 64-bit arguments
authorNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 16 Jun 2013 09:43:48 +0000 (13:43 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 16 Jun 2013 09:43:48 +0000 (13:43 +0400)
include/binproto.h

index a9e7571..ebecad1 100644 (file)
@@ -103,13 +103,13 @@ static  char *pack_args(char *to, const char *fmt, ...)
                        to += sizeof(d);
                        break;
                case 'x':
-                       x = va_arg(args, uint64_t);
+                       x = (uint64_t)va_arg(args, uint64_t);
                        *to++ = *t;
                        memcpy(to, &x, sizeof(x));
                        to += sizeof(x);
                        break;
                case 'p':
-                       p = va_arg(args, uint64_t);
+                       p = (uintptr_t)va_arg(args, uint64_t);
                        *to++ = *t;
                        memcpy(to, &p, sizeof(p));
                        to += sizeof(p);