aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-01-14 03:36:53 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-01-14 03:36:53 +0000
commitd27e1bd2eee2adb46d34d76ccd70ebba53abf12c (patch)
treee86ce0dc25e634ea5316b229f34b76b36f315b1e
parent7720989aafe390fb690f2aa52fc06da0de33688b (diff)
Fixed the bug that IMAP caches get wrongly deleted.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2427 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--NEWS5
-rw-r--r--libsylph/utils.c4
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3513588d..3d8c70c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-14
+
+ * libsylph/utils.c: to_unumber(); return 0 on error (-1 will return
+ UINT_MAX). Fixes the bug that IMAP caches get wrongly deleted.
+
2010-01-13
* version 3.0.0beta5
diff --git a/NEWS b/NEWS
index 3349c299..d6f0cc28 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
Changes of Sylpheed
+* 3.0.0beta6 (development)
+
+ * The bug that IMAP caches get wrongly deleted was fixed.
+ * The copyright year was updated.
+
* 3.0.0beta5 (development)
* The feature to customize the color label text was added.
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 6abbefa2..861fb7e2 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -319,10 +319,10 @@ guint to_unumber(const gchar *nstr)
register const gchar *p;
gulong val;
- if (*nstr == '\0') return -1;
+ if (*nstr == '\0') return 0;
for (p = nstr; *p != '\0'; p++)
- if (!g_ascii_isdigit(*p)) return -1;
+ if (!g_ascii_isdigit(*p)) return 0;
errno = 0;
val = strtoul(nstr, NULL, 10);