[GRASS-SVN] r44984 - grass/branches/releasebranch_6_4/vector/v.digit
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 12 05:43:50 EST 2011
Author: marisn
Date: 2011-01-12 02:43:50 -0800 (Wed, 12 Jan 2011)
New Revision: 44984
Modified:
grass/branches/releasebranch_6_4/vector/v.digit/i_face.c
Log:
v.digit Fix sprintf abuse (sprintf source and target should not overlap) (Merge from 6.5 r44983)
Modified: grass/branches/releasebranch_6_4/vector/v.digit/i_face.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.digit/i_face.c 2011-01-12 10:23:01 UTC (rev 44983)
+++ grass/branches/releasebranch_6_4/vector/v.digit/i_face.c 2011-01-12 10:43:50 UTC (rev 44984)
@@ -79,6 +79,7 @@
{
int i;
char val[1000];
+ char temp[1000];
G_debug(4, "i_new_line_options(), create = %d", create);
@@ -88,9 +89,10 @@
/* Set cat mode */
sprintf(val, "$GWidget(cat_mode) configure -values [list");
for (i = 0; i < CAT_MODE_COUNT; i++) {
- sprintf(val, "%s \"%s\"", val, CatModeLab[i]);
+ sprintf(temp, " \"%s\"", CatModeLab[i]);
+ strcat(val, temp);
}
- sprintf(val, "%s]", val);
+ strcat(val, "]");
G_debug(2, "Cat modes: %s", val);
Tcl_Eval(Toolbox, val);
More information about the grass-commit
mailing list