diff --git a/src/cc65/stmt.c b/src/cc65/stmt.c index ba20981f7..77b39859d 100644 --- a/src/cc65/stmt.c +++ b/src/cc65/stmt.c @@ -275,7 +275,7 @@ static void ReturnStatement (void) if (!F_HasVoidReturn (CurrentFunc)) { /* Convert the return value to the type of the function result */ - TypeConversion (&Expr, k, F_GetReturnType (CurrentFunc)); + k = TypeConversion (&Expr, k, F_GetReturnType (CurrentFunc)); /* Load the value into the primary */ ExprLoad (CF_NONE, k, &Expr);