lua-users home
lua-l archive

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


Is the same change needed in the VM's LOADBOOL?

void luaV_execute (lua_State *L, int nexeccalls) {
...
      case OP_LOADBOOL: {
        setbvalue(ra, GETARG_B(i));

I also don't understand why LOADK can load boolean values (taking up a
slot in the constant table in the process) when LOADBOOL exists

On 27/03/2008, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> > And we'll probably fix this
>
>
> Here is the fix:
>
>  static void LoadConstants(LoadState* S, Proto* f)
>  {
>   ...
>    case LUA_TBOOLEAN:
>         setbvalue(o,LoadChar(S)!=0);
>         break;
>