Fix for issue #67 - shared array problem

git-svn-id: http://picoc.googlecode.com/svn/trunk@404 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2010-01-03 17:45:35 +00:00
parent 3f113f1f16
commit 8f9095b3a4

View file

@ -187,8 +187,7 @@ void VariableDefinePlatformVar(struct ParseState *Parser, char *Ident, struct Va
{ {
struct Value *SomeValue = VariableAllocValueAndData(NULL, 0, IsWritable, NULL, TRUE); struct Value *SomeValue = VariableAllocValueAndData(NULL, 0, IsWritable, NULL, TRUE);
SomeValue->Typ = Typ; SomeValue->Typ = Typ;
if (Typ->Base != TypeArray) SomeValue->Val = FromValue;
SomeValue->Val = FromValue;
if (!TableSet((TopStackFrame == NULL) ? &GlobalTable : &TopStackFrame->LocalTable, TableStrRegister(Ident), SomeValue)) if (!TableSet((TopStackFrame == NULL) ? &GlobalTable : &TopStackFrame->LocalTable, TableStrRegister(Ident), SomeValue))
ProgramFail(Parser, "'%s' is already defined", Ident); ProgramFail(Parser, "'%s' is already defined", Ident);