summaryrefslogtreecommitdiff
path: root/src/Fl_Clock.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-12-14 00:34:34 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-12-14 00:34:34 +0000
commitc97fcd9c65207deae714665af55bf3cc59e95291 (patch)
tree399e076f6878a58de6c3da6e8b9bab097e4414dc /src/Fl_Clock.cxx
parent4c338a533ff16675a8f7f3646b9aacc18a6ceb00 (diff)
Fl_Clock_Output depended on a time value that was the same as an
unsigned long, which is incorrect for WIN64 and VC++ 2005 (STR #1079) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4701 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Clock.cxx')
-rw-r--r--src/Fl_Clock.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx
index 0cc8e2dbf..edb6749c4 100644
--- a/src/Fl_Clock.cxx
+++ b/src/Fl_Clock.cxx
@@ -119,7 +119,9 @@ void Fl_Clock_Output::value(int H, int m, int s) {
void Fl_Clock_Output::value(ulong v) {
value_ = v;
struct tm *timeofday;
- timeofday = localtime((const time_t *)&v);
+ // Some platforms, notably Windows, now use a 64-bit time_t value...
+ time_t vv = (time_t)v;
+ timeofday = localtime(&vv);
value(timeofday->tm_hour, timeofday->tm_min, timeofday->tm_sec);
}