Commit d21c7d4a authored by Jonathan Beck's avatar Jonathan Beck

Fixes for dates.

parent a2588b4b
......@@ -68,7 +68,8 @@ timeval Date::GetValue()
int32_t tv_sec = 0;
int32_t tv_usec = 0;
plist_get_date_val(_node, &tv_sec, &tv_usec);
return {tv_sec, tv_usec};
timeval t = {tv_sec, tv_usec};
return t;
}
};
......@@ -472,8 +472,8 @@ static void plist_get_type_and_value(plist_t node, plist_type * type, void *valu
break;
case PLIST_DATE:
//exception : here we use memory on the stack since it is just a temporary buffer
(*((GTimeVal **) value))->tv_sec = data->timeval.tv_sec;
(*((GTimeVal **) value))->tv_usec = data->timeval.tv_usec;
((GTimeVal *) value)->tv_sec = data->timeval.tv_sec;
((GTimeVal *) value)->tv_usec = data->timeval.tv_usec;
break;
case PLIST_ARRAY:
case PLIST_DICT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment