From 146a591ed0a97afbdf9f08b096f7f67747b36ea0 Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Wed, 22 Apr 2009 22:05:27 +0000 Subject: [PATCH] Fixed a bug in char<->int coercion in parameter passing. git-svn-id: http://picoc.googlecode.com/svn/trunk@263 21eae674-98b7-11dd-bd71-f92a316d2d60 --- expression.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expression.c b/expression.c index 656ecd0..45362ea 100644 --- a/expression.c +++ b/expression.c @@ -896,13 +896,13 @@ void ExpressionParseFunctionCall(struct ParseState *Parser, struct ExpressionSta { /* cast char to int */ Param->Val->Integer = Param->Val->Character; - Param->Typ == &IntType; + Param->Typ = &IntType; } else if (FuncValue->Val->FuncDef.ParamType[ArgCount] == &CharType && Param->Typ == &IntType) { /* cast int to char */ Param->Val->Integer = Param->Val->Character; - Param->Typ == &CharType; + Param->Typ = &CharType; } else ProgramFail(Parser, "parameter %d to %s() is the wrong type", ArgCount+1, FuncName);