tools

various tools
git clone git://deadbeef.fr/tools.git
Log | Files | Refs | README | LICENSE

commit 018b50ccf100fb2826e2ca7515a5b2a8264cf06f
parent 37f28959e7aaec2e4e82ad2226d07cbc85511a74
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Fri, 18 Dec 2020 12:33:27 +0100

lmerge: fix not browsing arguments correctly

Diffstat:
Mlmerge/src/lmerge.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lmerge/src/lmerge.cpp b/lmerge/src/lmerge.cpp @@ -90,7 +90,7 @@ bool allocate_markers( void print_help( char const* pgm, FILE* target, opt_desc_t const* start, opt_desc_t const* end ); -int main( int argc, char const *const *argv ) +int main( int argc, char **argv ) { char const * SEP_START = getenv( "FIELD_SEP" ); char const * SEP_ENTRY = getenv( "ENTRY_SEP" ); @@ -116,7 +116,7 @@ int main( int argc, char const *const *argv ) auto b_opts = std::begin( opts ); auto e_opts = std::end( opts ); - char const *arg = argv[1]; assert( argc > 0 ); + char **arg = &argv[1]; assert( argc > 0 ); for( int iarg = 1; iarg != argc; ++iarg, ++arg ) { auto error = parse_cmd_opt( arg, b_opts, e_opts );