Fix #including a definition that has local variables with proplists

The missing break meant that the freshly created copy of the proplist would
get overwritten by the original, which was thankfully caught and announced
with "internal error: constant proplist has the wrong parent".

Thanks to Zapper for the testcase.
scancodes-fix
Günther Brammer 2013-01-18 01:45:06 +01:00
parent e1ccbddd5e
commit ce87faaf9e
12 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[DefCore]
id=DummyParent
Version=5,3,0,0
Category=C4D_StaticBack
Width=8
Height=8
Offset=-4,-4

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

View File

@ -0,0 +1,13 @@
local ActMap=
{
Attach =
{
Prototype = Action,
Name="Attach",
Procedure=DFA_ATTACH,
NextAction="Be",
Length=1,
FacetBase=1,
AbortCall = "AttachTargetLost"
}
};

View File

@ -0,0 +1 @@
Name=Dummy

View File

@ -0,0 +1 @@
Name=Dummy

View File

@ -0,0 +1,7 @@
[DefCore]
id=DummyChild
Version=5,3,0,0
Category=C4D_StaticBack
Width=8
Height=8
Offset=-4,-4

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

View File

@ -0,0 +1,2 @@
#include DummyParent

View File

@ -0,0 +1 @@
Name=Dummy

View File

@ -0,0 +1 @@
Name=Dummy

View File

@ -0,0 +1 @@

View File

@ -2900,6 +2900,7 @@ void C4ScriptHost::CopyPropList(C4Set<C4Property> & from, C4PropListStatic * to)
}
to->SetPropertyByS(prop->Key, C4VPropList(p));
}
break;
case C4V_Array: // FIXME: copy the array if necessary
default:
to->SetPropertyByS(prop->Key, prop->Value);