lua-users home
lua-l archive

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


Coda Highland <chighland@gmail.com> 于2020年3月12日周四 下午11:58写道:
>
> If you're already patching the VM, it shouldn't be hard to just patch the seed assignment yourself.
>

I found that we don't even have to patch the VM  :)

https://gist.github.com/cloudwu/a094583029f15bb74fa6df194159d008

I wrote a small function `lua_changeseed(lua_State *L, unsigned int
seed);`  to change the seed.

-- 
http://blog.codingnow.com