diff options
-rw-r--r-- | src/lj_crecord.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index d4b9ddee..2b83f3a1 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -848,8 +848,11 @@ again: | |||
848 | 848 | ||
849 | /* Resolve reference for field. */ | 849 | /* Resolve reference for field. */ |
850 | ct = ctype_get(cts, sid); | 850 | ct = ctype_get(cts, sid); |
851 | if (ctype_isref(ct->info)) | 851 | if (ctype_isref(ct->info)) { |
852 | ptr = emitir(IRT(IR_XLOAD, IRT_PTR), ptr, 0); | 852 | ptr = emitir(IRT(IR_XLOAD, IRT_PTR), ptr, 0); |
853 | sid = ctype_cid(ct->info); | ||
854 | ct = ctype_get(cts, sid); | ||
855 | } | ||
853 | 856 | ||
854 | while (ctype_isattrib(ct->info)) | 857 | while (ctype_isattrib(ct->info)) |
855 | ct = ctype_child(cts, ct); /* Skip attributes. */ | 858 | ct = ctype_child(cts, ct); /* Skip attributes. */ |