[GRASS-SVN] r43548 - grass/branches/develbranch_6/general/g.message
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 20 23:13:24 EDT 2010
Author: hamish
Date: 2010-09-21 03:13:24 +0000 (Tue, 21 Sep 2010)
New Revision: 43548
Modified:
grass/branches/develbranch_6/general/g.message/main.c
Log:
Glynn: Don't treat message as a format string (bug #1162; backport from trunk)
Modified: grass/branches/develbranch_6/general/g.message/main.c
===================================================================
--- grass/branches/develbranch_6/general/g.message/main.c 2010-09-21 00:50:44 UTC (rev 43547)
+++ grass/branches/develbranch_6/general/g.message/main.c 2010-09-21 03:13:24 UTC (rev 43548)
@@ -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