camlibs/ptp2/ptp-pack.c: Qualify previous change only for olcver=0x13 cameras.

This commit is contained in:
Arkell Rasiah
2021-03-18 12:51:20 -07:00
committed by Marcus Meissner
parent f5f5f010c1
commit 5bf98e7f09

View File

@@ -2599,10 +2599,15 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, unsigned int d
*/
proptype = PTP_DPC_CANON_EOS_Aperture;
dpd = _lookup_or_allocate_canon_prop(params, proptype);
if (olcver >= 0x12)
dpd->CurrentValue.u16 = curdata[curoff+7]; /* CHECK */
else
if (olcver >= 0x12) {
if (olcver == 0x13) {
dpd->CurrentValue.u16 = curdata[curoff+7]; /* R5 */
} else {
dpd->CurrentValue.u16 = curdata[curoff+5]; /* CHECK */
}
} else {
dpd->CurrentValue.u16 = curdata[curoff+4]; /* just use last byte */
}
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_PROPERTY;
ce[i].u.propid = proptype;