diff options
Diffstat (limited to 'src/lj_cconv.c')
-rw-r--r-- | src/lj_cconv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c index 240a8d10..b09c0abe 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c | |||
@@ -603,7 +603,10 @@ void lj_cconv_ct_tv(CTState *cts, CType *d, | |||
603 | tmpptr = (void *)0; | 603 | tmpptr = (void *)0; |
604 | flags |= CCF_FROMTV; | 604 | flags |= CCF_FROMTV; |
605 | } else if (tvisudata(o)) { | 605 | } else if (tvisudata(o)) { |
606 | tmpptr = uddata(udataV(o)); | 606 | GCudata *ud = udataV(o); |
607 | tmpptr = uddata(ud); | ||
608 | if (ud->udtype == UDTYPE_IO_FILE) | ||
609 | tmpptr = *(void **)tmpptr; | ||
607 | } else if (tvislightud(o)) { | 610 | } else if (tvislightud(o)) { |
608 | tmpptr = lightudV(o); | 611 | tmpptr = lightudV(o); |
609 | } else if (tvisfunc(o)) { | 612 | } else if (tvisfunc(o)) { |