diff options
| author | Mike Pall <mike> | 2014-05-15 17:28:08 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2014-05-15 17:28:08 +0200 |
| commit | fe288e7b836deb21fedf489c590d2e2a6ad6816b (patch) | |
| tree | ae60a0eeab509d4f184aa1cbc2499985e730017a | |
| parent | 8a38af2f99685eac412d862dd379036ad65cbb6e (diff) | |
| download | luajit-fe288e7b836deb21fedf489c590d2e2a6ad6816b.tar.gz luajit-fe288e7b836deb21fedf489c590d2e2a6ad6816b.tar.bz2 luajit-fe288e7b836deb21fedf489c590d2e2a6ad6816b.zip | |
FFI: Fix recording of indexing a struct pointer ctype object itself.
| -rw-r--r-- | src/lj_crecord.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 69b21f88..d4b9ddee 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
| @@ -794,7 +794,7 @@ again: | |||
| 794 | } | 794 | } |
| 795 | } else if (tref_isstr(idx)) { | 795 | } else if (tref_isstr(idx)) { |
| 796 | GCstr *name = strV(&rd->argv[1]); | 796 | GCstr *name = strV(&rd->argv[1]); |
| 797 | if (cd->ctypeid == CTID_CTYPEID) | 797 | if (cd && cd->ctypeid == CTID_CTYPEID) |
| 798 | ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); | 798 | ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); |
| 799 | if (ctype_isstruct(ct->info)) { | 799 | if (ctype_isstruct(ct->info)) { |
| 800 | CTSize fofs; | 800 | CTSize fofs; |
| @@ -835,6 +835,7 @@ again: | |||
| 835 | CType *cct = ctype_rawchild(cts, ct); | 835 | CType *cct = ctype_rawchild(cts, ct); |
| 836 | if (ctype_isstruct(cct->info)) { | 836 | if (ctype_isstruct(cct->info)) { |
| 837 | ct = cct; | 837 | ct = cct; |
| 838 | cd = NULL; | ||
| 838 | if (tref_isstr(idx)) goto again; | 839 | if (tref_isstr(idx)) goto again; |
| 839 | } | 840 | } |
| 840 | } | 841 | } |
