From a7c1330c6c97d9f55e60ef26839ebc238e1a830a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 6 Mar 2003 21:36:12 +0000 Subject: fixed version_settings generation (now Indy3 works again) svn-id: r6725 --- common/gameDetector.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 6adefb779d..81ee9e218c 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -190,10 +190,16 @@ GameDetector::GameDetector() { int skyCount = countVersions(skyVersions); VersionSettings *v = (VersionSettings *)calloc(scummCount + simonCount + skyCount + 1, sizeof(VersionSettings)); - memcpy(v, scummVersions, scummCount * sizeof(VersionSettings)); - memcpy(v+scummCount, simonVersions, simonCount * sizeof(VersionSettings)); - memcpy(v+skyCount, skyVersions, skyCount * sizeof(VersionSettings)); version_settings = v; + + memcpy(v, scummVersions, scummCount * sizeof(VersionSettings)); + v += scummCount; + + memcpy(v, simonVersions, simonCount * sizeof(VersionSettings)); + v += simonCount; + + memcpy(v, skyVersions, skyCount * sizeof(VersionSettings)); + v += skyCount; } } -- cgit v1.2.3