shithub: choc

Download patch

ref: ed17e7924a34e5a5105e16b2608d4b145e75f6b0
parent: 8eda8d536064325a57d57efae613deb9ba015bf4
author: Turo Lamminen <turol@iki.fi>
date: Mon Feb 1 10:29:19 EST 2021

Clear myargv contents as they're moved to newargv

--- a/src/m_argv.c
+++ b/src/m_argv.c
@@ -132,6 +132,7 @@
     for (i=0; i<argv_index; ++i)
     {
         newargv[i] = myargv[i];
+        myargv[i] = NULL;
         ++newargc;
     }
 
@@ -205,6 +206,7 @@
     for (i=argv_index + 1; i<myargc; ++i)
     {
         newargv[newargc] = myargv[i];
+        myargv[i] = NULL;
         ++newargc;
     }