diff options
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -663,11 +663,11 @@ static int boolT (FuncState *fs) { | |||
| 663 | ** Add nil to list of constants and return its index. | 663 | ** Add nil to list of constants and return its index. |
| 664 | */ | 664 | */ |
| 665 | static int nilK (FuncState *fs) { | 665 | static int nilK (FuncState *fs) { |
| 666 | TValue k, v; | 666 | lua_State *L = fs->ls->L; |
| 667 | setnilvalue(&v); | 667 | TValue k; |
| 668 | /* cannot use nil as key; instead use table itself */ | 668 | /* cannot use nil as key; instead use table itself */ |
| 669 | sethvalue(fs->ls->L, &k, fs->kcache); | 669 | sethvalue(L, &k, fs->kcache); |
| 670 | return k2proto(fs, &k, &v); | 670 | return k2proto(fs, &k, &G(L)->nilvalue); |
| 671 | } | 671 | } |
| 672 | 672 | ||
| 673 | 673 | ||
