]> git.sur5r.net Git - cc65/blobdiff - src/cc65/stmt.c
Fixed a bug
[cc65] / src / cc65 / stmt.c
index ba20981f74a94e7f63970f1474d773e5fc74ed98..77b39859d1775972f743138e40e48946c9c9f4b1 100644 (file)
@@ -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);