summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-17 23:03:50 +0200
committerGravatar Jonathan Beck2009-10-17 23:03:50 +0200
commitd21c7d4a9c90232bd8f444c0b620f8fe465387d5 (patch)
treec0f50fe4371beb19b39323e84d3790136fda813b /src
parenta2588b4b19e898d483d5512cf974e1ccda45d5b6 (diff)
downloadlibplist-d21c7d4a9c90232bd8f444c0b620f8fe465387d5.tar.gz
libplist-d21c7d4a9c90232bd8f444c0b620f8fe465387d5.tar.bz2
Fixes for dates.
Diffstat (limited to 'src')
-rw-r--r--src/Date.cpp3
-rw-r--r--src/plist.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Date.cpp b/src/Date.cpp
index 46ef14e..1aebfab 100644
--- a/src/Date.cpp
+++ b/src/Date.cpp
@@ -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;
}
};
diff --git a/src/plist.c b/src/plist.c
index ed73d53..95b9593 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -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: