diff options
Diffstat (limited to 'engines/wintermute/Base/scriptables/SXDate.cpp')
-rw-r--r-- | engines/wintermute/Base/scriptables/SXDate.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/wintermute/Base/scriptables/SXDate.cpp b/engines/wintermute/Base/scriptables/SXDate.cpp index 2947428dad..069e31b06b 100644 --- a/engines/wintermute/Base/scriptables/SXDate.cpp +++ b/engines/wintermute/Base/scriptables/SXDate.cpp @@ -241,10 +241,12 @@ HRESULT CSXDate::ScSetProperty(const char *Name, CScValue *Value) { HRESULT CSXDate::Persist(CBPersistMgr *PersistMgr) {
CBScriptable::Persist(PersistMgr);
- if (PersistMgr->_saving)
- PersistMgr->PutBytes((byte *)&_tm, sizeof(_tm));
- else
- PersistMgr->GetBytes((byte *)&_tm, sizeof(_tm));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_year));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_mon));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_mday));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_hour));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_min));
+ PersistMgr->Transfer(TMEMBER(_tm.tm_sec));
return S_OK;
}
|