[brlcad-commits] SF.net SVN: brlcad:[37997] brlcad/trunk/src/mged/utility1.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-03-10 23:25:49
|
Revision: 37997 http://brlcad.svn.sourceforge.net/brlcad/?rev=37997&view=rev Author: starseeker Date: 2010-03-10 23:25:42 +0000 (Wed, 10 Mar 2010) Log Message: ----------- Might want to allocate enough memory for the new argv rays for the editor commands... Modified Paths: -------------- brlcad/trunk/src/mged/utility1.c Modified: brlcad/trunk/src/mged/utility1.c =================================================================== --- brlcad/trunk/src/mged/utility1.c 2010-03-10 22:54:40 UTC (rev 37996) +++ brlcad/trunk/src/mged/utility1.c 2010-03-10 23:25:42 UTC (rev 37997) @@ -145,7 +145,7 @@ bu_vls_init(&editstring); get_editor_string(&editstring); - av = (char **)bu_malloc(sizeof(char *)*(argc + 1), "f_edcolor: av"); + av = (char **)bu_malloc(sizeof(char *)*(argc + 2), "f_edcolor: av"); av[0] = bu_vls_addr(&editstring); for (i = 1; i < argc + 1; ++i) av[i] = argv[i-1]; @@ -188,7 +188,7 @@ bu_vls_init(&editstring); get_editor_string(&editstring); - av = (char **)bu_malloc(sizeof(char *)*(argc + 1), "f_edcodes: av"); + av = (char **)bu_malloc(sizeof(char *)*(argc + 2), "f_edcodes: av"); av[0] = bu_vls_addr(&editstring); for (i = 1; i < argc + 1; ++i) av[i] = argv[i-1]; @@ -231,7 +231,7 @@ bu_vls_init(&editstring); get_editor_string(&editstring); - av = (char **)bu_malloc(sizeof(char *)*(argc + 1), "f_edmater: av"); + av = (char **)bu_malloc(sizeof(char *)*(argc + 2), "f_edmater: av"); av[0] = bu_vls_addr(&editstring); for (i = 1; i < argc + 1; ++i) av[i] = (char *)argv[i-1]; @@ -274,7 +274,7 @@ bu_vls_init(&editstring); get_editor_string(&editstring); - av = (char **)bu_malloc(sizeof(char *)*(argc + 1), "f_red: av"); + av = (char **)bu_malloc(sizeof(char *)*(argc + 2), "f_red: av"); av[0] = bu_vls_addr(&editstring); for (i = 1; i < argc + 1; ++i) av[i] = argv[i-1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |