aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWalter van Niftrik2009-02-23 01:59:04 +0000
committerWalter van Niftrik2009-02-23 01:59:04 +0000
commitce7377ff5bb6bdd38ae66d11e2b57554f7651414 (patch)
treee5777eaff2e2461a587bec05ba4c7bcddff8cd62 /engines/sci
parentc327ed3faf31241ed0f385884bb7ef3268de0b09 (diff)
downloadscummvm-rg350-ce7377ff5bb6bdd38ae66d11e2b57554f7651414.tar.gz
scummvm-rg350-ce7377ff5bb6bdd38ae66d11e2b57554f7651414.tar.bz2
scummvm-rg350-ce7377ff5bb6bdd38ae66d11e2b57554f7651414.zip
SCI: Fix incorrect usage of struct tm in date function of kGetTime
svn-id: r38803
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 62fc356857..1588ae829a 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -543,7 +543,7 @@ reg_t kGetTime(EngineState *s, int funct_nr, int argc, reg_t *argv) {
break;
}
case _K_NEW_GETTIME_DATE : {
- retval = (loc_time.tm_mon << 5) | loc_time.tm_mday | (loc_time.tm_year << 9);
+ retval = ((loc_time.tm_mon + 1) << 5) | loc_time.tm_mday | (((loc_time.tm_year + 1900) & 0x7f) << 9);
debugC(2, kDebugLevelTime, "GetTime(date) returns %d", retval);
break;
}