Assignment instead of equality?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Assignment instead of equality?

Ahmed Charles
https://github.com/lua/lua/blob/89f6a85f034b2535e43e421991098fa05a92cd60/lcode.c#L367

    lua_assert(f->abslineinfo[fs->nabslineinfo].pc = pc);

should be:

    lua_assert(f->abslineinfo[fs->nabslineinfo].pc == pc);

I think.
Reply | Threaded
Open this post in threaded view
|

Re: Assignment instead of equality?

Roberto Ierusalimschy
> https://github.com/lua/lua/blob/89f6a85f034b2535e43e421991098fa05a92cd60/lcode.c#L367
>
>     lua_assert(f->abslineinfo[fs->nabslineinfo].pc = pc);
>
> should be:
>
>     lua_assert(f->abslineinfo[fs->nabslineinfo].pc == pc);
>
> I think.

Sure. Thanks,


-- Roberto