aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-06-09 14:23:04 +0000
committerFilippos Karapetis2008-06-09 14:23:04 +0000
commit9e9c38c68939f59b6e577a8225e38235f5ae2f45 (patch)
treed1db6e1d01e4a4aed354314225b4001d90072827
parent32edf673a4685224062a3eef9e4756180bb94803 (diff)
downloadscummvm-rg350-9e9c38c68939f59b6e577a8225e38235f5ae2f45.tar.gz
scummvm-rg350-9e9c38c68939f59b6e577a8225e38235f5ae2f45.tar.bz2
scummvm-rg350-9e9c38c68939f59b6e577a8225e38235f5ae2f45.zip
Bugfix to read the first array element correctly by sev
svn-id: r32634
-rw-r--r--engines/drascula/drascula.cpp3
-rw-r--r--engines/drascula/drascula.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index c300066f4f..32ece3cd8a 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -930,10 +930,11 @@ char ***DrasculaEngine::loadTexts(Common::File &in) {
res[lang] = (char **)malloc(sizeof(char *) * numTexts);
res[lang][0] = pos = (char *)malloc(entryLen);
+ res[lang][0] = pos + DATAALIGNMENT;
in.read(res[lang][0], entryLen);
- pos += 4;
+ pos += DATAALIGNMENT;
for (int i = 1; i < numTexts; i++) {
pos -= 2;
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index f462480ffc..54d6784ec5 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -48,6 +48,7 @@ namespace Drascula {
// Do not update this yet. The file is not loaded fully
#define DRASCULA_DAT_VER 1
+#define DATAALIGNMENT 4
enum DrasculaGameFeatures {
GF_PACKED = (1 << 0)