erikkaashoek / Comskip

A free commercial detector
GNU General Public License v2.0
598 stars 80 forks source link

Corrected LoadSettings command line argument print out #134

Closed AhiyaHiya closed 2 years ago

AhiyaHiya commented 3 years ago

Corrected how command line parameters are printed to console to avoid access violation crash that can occur on Windows when the length of a given parameter is greater than MAX_ARG, which is limited to 260 char.

Example string used for testing:

C:\Users\AhiyaHiya\Applications\Utility\Media\ComSkip\ComSkip.exe "--ini=C:\Users\AhiyaHiya\Applications\Utility\Media\ComSkip\comskip.ini" --output=C:\Users\AhiyaHiya\Media\Television\2020\08\20\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING -t --verbose=1 "C:\Users\AhiyaHiya\Media\Television\2020\08\20\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING\SOMEREALLLYLONGSTRING\ABC Good Morning America (2021) - 2020-08-20 07 00 00 - ABC Good Morning America.ts"
AhiyaHiya commented 2 years ago

Note, Pull Request #140 has to be merged before this PR can be approved.