[gtksourceview/wip/fix-warnings] UndoManagerDefault: fix warning
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/fix-warnings] UndoManagerDefault: fix warning
- Date: Sun, 9 Aug 2015 15:04:18 +0000 (UTC)
commit c5fcb5381621c189016f0c5b6a40d1b4ed8796e8
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Aug 9 16:59:39 2015 +0200
UndoManagerDefault: fix warning
gtksourceview/gtksourceundomanagerdefault.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourceundomanagerdefault.c b/gtksourceview/gtksourceundomanagerdefault.c
index 379579a..3a05906 100644
--- a/gtksourceview/gtksourceundomanagerdefault.c
+++ b/gtksourceview/gtksourceundomanagerdefault.c
@@ -372,7 +372,9 @@ check_history_size (GtkSourceUndoManagerDefault *manager)
return;
}
- while (manager->priv->action_groups->length > manager->priv->max_undo_levels)
+ g_return_if_fail (manager->priv->max_undo_levels > 0);
+
+ while (manager->priv->action_groups->length > (guint)manager->priv->max_undo_levels)
{
/* Strip redo action groups first. */
if (manager->priv->location != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]