argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
372 stars 65 forks source link

Added a new function arg_dstr_catc() for appending char types #37

Closed jhzeba closed 5 years ago

jhzeba commented 5 years ago

The arg_dstr_cat() function expects a string. When the function is passed a pointer to char type, the '\0' is missing and produces garbage.

tomghuang commented 5 years ago

@hzeba Thank you for finding this issue. I will add a test case for it later.

jhzeba commented 5 years ago

@tomghuang Not a problem. I saw a few other places in the code appending "\n" as a string. These could be updated to use _catc() function as well.