diff options
author | Logan Rathbone <poprocks@gmail.com> | 2023-01-24 21:23:42 -0500 |
---|---|---|
committer | Logan Rathbone <poprocks@gmail.com> | 2023-01-24 21:23:42 -0500 |
commit | 50937a124573d40291049ee3984a14e95231f2ae (patch) | |
tree | 5ca0cb523f7e18fdb908c5f8009aaa240c423009 /src/forms.c | |
parent | f4176bf1bd5d0150902cebe664ff6ff232404511 (diff) | |
download | zenity-50937a124573d40291049ee3984a14e95231f2ae.tar.gz |
forms: Fix parameter order in calendar segment
Diffstat (limited to 'src/forms.c')
-rw-r--r-- | src/forms.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/forms.c b/src/forms.c index f3ce547..4e4a60e 100644 --- a/src/forms.c +++ b/src/forms.c @@ -351,7 +351,7 @@ zenity_forms_dialog_output (ZenityFormsData *forms_data) { GSList *tmp, *tmp2; guint day, year, month; - GDate *date = NULL; + g_autoptr(GDate) date = NULL; char time_string[128]; g_autofree char *combo_value = NULL; GtkTreeSelection *selection; @@ -399,9 +399,8 @@ zenity_forms_dialog_output (ZenityFormsData *forms_data) "month", &month, "year", &year, NULL); - date = g_date_new_dmy (year, month + 1, day); - g_date_strftime (time_string, - 127, forms_data->date_format, date); + date = g_date_new_dmy (day, month + 1, year); + g_date_strftime (time_string, sizeof time_string, forms_data->date_format, date); g_print ("%s", time_string); break; |