diff options
-rw-r--r-- | filter/ChangeLog | 6 | ||||
-rw-r--r-- | filter/filter-int.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index a1debaee1e..9926728843 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2007-07-27 Johnny Jacob <jjohnny@novell.com> + + ** Fix for bug #457523. + + * filter-int.c: (format_sexp): use (- n) for negative values. + 2007-06-15 Milan Crha <mcrha@redhat.com> ** Fix for bug #263207 diff --git a/filter/filter-int.c b/filter/filter-int.c index 873e6a4a33..ce254c4f4a 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -264,6 +264,10 @@ static void format_sexp (FilterElement *fe, GString *out) { FilterInt *fs = (FilterInt *)fe; - - g_string_append_printf (out, "%d", fs->val); + + if (fs->val < 0) + /* See #364731 #457523 C6*/ + g_string_append_printf (out, "(- %d)", (fs->val * -1)); + else + g_string_append_printf (out, "%d", fs->val); } |