Fixed issue #60 - addresses of array indexes not working correctly.

git-svn-id: http://picoc.googlecode.com/svn/trunk@352 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-10-28 20:55:51 +00:00
parent 7a407782bb
commit 66f40f6310

View file

@ -437,7 +437,7 @@ void ExpressionPrefixOperator(struct ParseState *Parser, struct ExpressionStack
Result->Val->Pointer.Offset = (char *)Result->Val - (char *)Result->LValueFrom; Result->Val->Pointer.Offset = (char *)Result->Val - (char *)Result->LValueFrom;
#else #else
if (TempLValue->Typ->Base == TypeArray) if (TempLValue->Typ->Base == TypeArray)
Result->Val->NativePointer = TempLValue->Val->Array.Data; Result->Val->NativePointer = TopValue->Val;
else else
Result->Val->NativePointer = TempLValue->Val; Result->Val->NativePointer = TempLValue->Val;
#endif #endif