lua-users home
lua-l archive

Re: rawget Segmentation Fault

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


On 2001年12月21日, Eric Mauger wrote:
> Hi,
>
> I made a small mistake in a script :
>
> t = { }
> rawget(t, "test", 1)
>
> and it caused a Segmentation Fault.
A silly bug. Thanks for the report. The correction is (in 4.0):
lbaselib.c: 168: function luaB_rawget
- lua_rawget(L, -2);
+ lua_rawget(L, 1);
lbaselib.c: 172: function luaB_rawset
- lua_rawset(L, -3);
+ lua_rawset(L, 1);
(rawset has the same bug...) Version work3 has the same problem, and
a similar correction.
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /