From: Daniel Karbach Date: Mon, 10 Sep 2012 20:55:07 +0000 (+0200) Subject: tackled some problems (not all :) ) X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=ec8e74c6f78502fb4c1d971051960ce9f1757978;p=l2e.git tackled some problems (not all :) ) --- diff --git a/src/common/Ikari.cpp b/src/common/Ikari.cpp index 604ca5b..8ed8698 100644 --- a/src/common/Ikari.cpp +++ b/src/common/Ikari.cpp @@ -37,7 +37,7 @@ void Ikari::CreateTypeDescription() { td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), stringId, true)); td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), numberId, false)); td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), targetsId, false)); - td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), boolId, true)); + td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), boolId, false)); } void Ikari::Construct(void *data) { diff --git a/src/common/TargetingMode.cpp b/src/common/TargetingMode.cpp index 4763588..0a092e2 100644 --- a/src/common/TargetingMode.cpp +++ b/src/common/TargetingMode.cpp @@ -24,8 +24,8 @@ void TargetingMode::CreateTypeDescription() { td.SetConstructor(&Construct); td.SetSize(sizeof(TargetingMode)); - td.AddField("faction", FieldDescription(((char *)&t.ally) - ((char *)&t), boolId, true)); - td.AddField("mode", FieldDescription(((char *)&t.mode) - ((char *)&t), numberId, true)); + td.AddField("faction", FieldDescription(((char *)&t.ally) - ((char *)&t), boolId, false)); + td.AddField("mode", FieldDescription(((char *)&t.mode) - ((char *)&t), numberId, false)); } void TargetingMode::Construct(void *data) { diff --git a/src/loader/utility.cpp b/src/loader/utility.cpp index ee88ea0..f5011e6 100644 --- a/src/loader/utility.cpp +++ b/src/loader/utility.cpp @@ -20,7 +20,7 @@ string Dirname(const string &path) { std::memcpy(str, path.c_str(), path.size()); str[path.size()] = '\0'; string dn(dirname(str)); - delete str; + delete[] str; return dn; } diff --git a/src/main.cpp b/src/main.cpp index 6be5e7c..2c80962 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -89,6 +89,7 @@ int main(int argc, char **argv) { Gauge::CreateTypeDescription(); Hero::CreateTypeDescription(); Ikari::CreateTypeDescription(); + Interpreter::CreateTypeDescriptions(); Item::CreateTypeDescription(); graphics::MenuProperties::CreateTypeDescription(); PartyLayout::CreateTypeDescription();