goffice r2034 - in trunk: . goffice/utils
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2034 - in trunk: . goffice/utils
- Date: Fri, 25 Jan 2008 03:00:33 +0000 (GMT)
Author: mortenw
Date: Fri Jan 25 03:00:33 2008
New Revision: 2034
URL: http://svn.gnome.org/viewvc/goffice?rev=2034&view=rev
Log:
2008-01-24 Morten Welinder <terra gnome org>
* goffice/utils/go-format.c (go_format_execute): For
OP_DATE_SPLIT, make sure to set day/month/year/weekday even in the
error case. Fixes #511435.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/goffice/utils/go-format.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jan 25 03:00:33 2008
@@ -3,6 +3,9 @@
Misc:
* Automate library, headers, and .pc versioning.
+Morten:
+ * Fix critical for bogus dates. [#511435]
+
--------------------------------------------------------------------------
goffice 0.6.0:
Modified: trunk/goffice/utils/go-format.c
==============================================================================
--- trunk/goffice/utils/go-format.c (original)
+++ trunk/goffice/utils/go-format.c Fri Jan 25 03:00:33 2008
@@ -2187,16 +2187,14 @@
date_conv);
if (!g_date_valid (&date)) {
res = GO_FORMAT_NUMBER_DATE_ERROR;
- break;
+ g_date_set_dmy (&date, 1, 1, 1900);
}
year = g_date_get_year (&date);
- if (year > 9999) {
- res = GO_FORMAT_NUMBER_DATE_ERROR;
- break;
- }
month = g_date_get_month (&date);
day = g_date_get_day (&date);
weekday = g_date_get_weekday (&date);
+ if (year > 9999)
+ res = GO_FORMAT_NUMBER_DATE_ERROR;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]