Skip to content

Commit

Permalink
daterange : fix wrong date casting in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AlicVB authored and TurboGit committed Nov 25, 2023
1 parent b157656 commit b1d2681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dtgtk/range.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static gchar *_default_print_date_func(const double value, const gboolean detail
}
static gboolean _default_decode_date_func(const gchar *text, double *value)
{
long val = dt_datetime_exif_to_gtimespan(text);
GTimeSpan val = dt_datetime_exif_to_gtimespan(text);
if(val > 0)
{
*value = val;
Expand Down Expand Up @@ -1748,7 +1748,7 @@ GtkWidget *dtgtk_range_select_new(const gchar *property, const gboolean show_ent
DT_DEBUG_CONTROL_SIGNAL_CONNECT(darktable.signals, DT_SIGNAL_PREFERENCES_CHANGE, G_CALLBACK(_dt_pref_changed),
range);
gtk_widget_set_name((GtkWidget *)range, "dt-range");

return (GtkWidget *)range;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/filters/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static gboolean _date_update(dt_lib_filtering_rule_t *rule)
while(sqlite3_step(stmt) == SQLITE_ROW)
{
const int count = sqlite3_column_int(stmt, 1);
const long dt = sqlite3_column_int64(stmt, 0);
const int64_t dt = sqlite3_column_int64(stmt, 0);
dtgtk_range_select_add_block(range, dt, count);
if(rangetop) dtgtk_range_select_add_block(rangetop, dt, count);
}
Expand Down

0 comments on commit b1d2681

Please sign in to comment.