[GRASS-SVN] r43606 -
grass/branches/releasebranch_6_4/general/g.message
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 22 04:54:05 EDT 2010
Author: hamish
Date: 2010-09-22 08:54:05 +0000 (Wed, 22 Sep 2010)
New Revision: 43606
Modified:
grass/branches/releasebranch_6_4/general/g.message/main.c
Log:
Glynn: Don't treat message as a format string (bug #1162; backport from trunk)
Modified: grass/branches/releasebranch_6_4/general/g.message/main.c
===================================================================
--- grass/branches/releasebranch_6_4/general/g.message/main.c 2010-09-22 08:38:38 UTC (rev 43605)
+++ grass/branches/releasebranch_6_4/general/g.message/main.c 2010-09-22 08:54:05 UTC (rev 43606)
@@ -93,9 +93,9 @@
debug_level = atoi(debug_opt->answer);
if (fatal->answer)
- G_fatal_error(message->answer);
+ G_fatal_error("%s", message->answer);
else if (warning->answer)
- G_warning(message->answer);
+ G_warning("%s", message->answer);
else if (percent->answer) {
int i, n, s;
i = n = s = -1;
@@ -106,13 +106,13 @@
fprintf(stderr, "\n");
}
else if (debug_flag->answer)
- G_debug(debug_level, message->answer);
+ G_debug(debug_level, "%s", message->answer);
else if (important->answer)
- G_important_message(message->answer);
+ G_important_message("%s", message->answer);
else if (verbose->answer)
- G_verbose_message(message->answer);
+ G_verbose_message("%s", message->answer);
else
- G_message(message->answer);
+ G_message("%s", message->answer);
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list