On Sat, Mar 24, 2018 at 01:32:03AM +0300, Alexey Kryukov wrote: > On Fri, 23 Mar 2018 20:39:19 +0100 > Marcus Meissner wrote: > > > + header->version_major = dtoh32a(&data[off]); > > + header->version_minor = dtoh32a(&data[off+=4]); > > > > Here data[off] is used twice. > > Hmm. I see nothing wrong with this, as 0+=4 should return 4. At least > it works this way for me: version_major 2, version_minor 1 and so on. > Of course offset to viewport description is also correct, it just would > not work otherwise.
Ah sorry, my mind was at off++ where you would still get off as result of the expression. Your code is fine. :) Ciao, Marcus ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gphoto-devel mailing list Gphoto-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gphoto-devel