[nautilus] Ensure range checking works below zero
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus] Ensure range checking works below zero
- Date: Thu, 19 Nov 2009 11:54:03 +0000 (UTC)
commit 7a890c3f5adb8eb35e208958b293e03c691c7830
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 19 12:45:18 2009 +0100
Ensure range checking works below zero
We add an int to an unsigned and then check for underflow, but
this check will never trigger for unsigned variables like an enum.
We fix this by using a signed value for the addition result.
src/file-manager/fm-list-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 902f242..f24d30a 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2418,7 +2418,7 @@ static void
fm_list_view_bump_zoom_level (FMDirectoryView *view, int zoom_increment)
{
FMListView *list_view;
- NautilusZoomLevel new_level;
+ gint new_level;
g_return_if_fail (FM_IS_LIST_VIEW (view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]