asalamon74 / pktriggercord

Remote control for Pentax DSLR cameras
http://pktriggercord.melda.info
GNU Lesser General Public License v3.0
103 stars 38 forks source link

Fix C99 compatibility issue with sprintf() in pslr_enum.c. #55

Closed sh0 closed 4 years ago

sh0 commented 4 years ago

Since C99 standard, sprintf(...) has 'restrict' buffer qualifier and cannot accept same buffer as both source and destination. The string appending method has now been changed to be compliant to this requirement.

I do not have a Pentax camera so it would be nice if someone did testing. Generally I'm pretty confident that this change will not cause issues.

asalamon74 commented 4 years ago

Thanks again for the PRs.

Somehow travis stopped commenting back to the project, but it found some styling problem. Can you please check it: https://travis-ci.org/github/asalamon74/pktriggercord/builds/715900453

sh0 commented 4 years ago

Thanks for taking a look at this patch. Somehow I had missed the astyle checking. I have now added braces to if statement and the test build succeeds. Other PRs should be fine.

asalamon74 commented 4 years ago

Tested, looks good to me, committed. asalamon74/pktriggercord@b870a3731536356da1eec7b6d2f3faf40ab49733 Thanks