lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Strange.  I added the extra line and did a make clean, and then a make,   but 
 this patch doesn't seem to make any difference.

$ bin/lua
Lua 4.1 (work4)  Copyright (C) 1994-2001 TeCGraf, PUC-Rio
> local a,b  ; a,b=1,sin(3) ; print(a,b)
0.05233595624294383     0.05233595624294383
> local a,b,c ; a,b,c=1,2,sin(3) ; print(a,b,c)
2       0.05233595624294383     0.05233595624294383
> 

Has anyone else tried this patch?

- Peter

On Thursday 18 April 2002 08:53, you wrote:
> I think this is the patch to that bug:
>
> * lparser.c:
>
>           ls->fs->freereg -= nexps - nvars;  /* remove extra values */
>       }
>       else {
> +       luaK_setcallreturns(ls->fs, &e, 1);  /* close last expression */
>         luaK_storevar(ls->fs, &lh->v, &e);
>         return;  /* avoid default */
>       }
>
> -- Roberto