diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2017-04-01 21:47:44 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2017-04-01 21:47:44 +0200 |
commit | 56f937ffa425adfcc4eaf2607892d56df759a22b (patch) | |
tree | 6842c80568033f3be8da1493b7a2fc64d0693a72 /src | |
parent | d717ebc3eefcd45800f3249594027a5b17bdc789 (diff) | |
download | libmtp-56f937ffa425adfcc4eaf2607892d56df759a22b.tar.gz |
Fixed getpartialobject on non-x86_64 systems
Diffstat (limited to 'src')
-rw-r--r-- | src/ptp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* ptp.c * * Copyright (C) 2001-2004 Mariusz Woloszyn <emsi@ipartners.pl> - * Copyright (C) 2003-2016 Marcus Meissner <marcus@jet.franken.de> + * Copyright (C) 2003-2017 Marcus Meissner <marcus@jet.franken.de> * Copyright (C) 2006-2008 Linus Walleij <triad@df.lth.se> * Copyright (C) 2007 Tero Saarni <tero.saarni@gmail.com> * Copyright (C) 2009 Axel Waggershauser <awagger@web.de> @@ -4096,7 +4096,8 @@ ptp_android_getpartialobject64 (PTPParams* params, uint32_t handle, uint64_t off { PTPContainer ptp; - PTP_CNT_INIT(ptp, PTP_OC_ANDROID_GetPartialObject64, handle, offset & 0xFFFFFFFF, offset >> 32, maxbytes); + /* casts due to varargs otherwise pushing 64bit values on the stack */ + PTP_CNT_INIT(ptp, PTP_OC_ANDROID_GetPartialObject64, handle, ((uint32_t)offset & 0xFFFFFFFF), (uint32_t)(offset >> 32), maxbytes); return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, object, len); } |