Hi Gavin,
> static const int rdir_buf[RDIR_BUFLEN/sizeof(int)];
...
> lua_pushstring(L, (char *)(&rdir_buf[6])); /* name */
> lua_pushinteger(L, rdir_buf[5]); /* file type */
> return 2; /* number of returned values */
...
> The 'name' part comes out OK, but the 'ftype' is always zero, and I
> just cannot see why.
Sounds like rdir_buf is being re-used, but only the first 24 bytes of
it, trampling the filetype, but not the filename, before the push. Do
you see filetype in rdir_buf[5] when you lua_pushinteger() above? If
so, what happens between the push of the correct filetype and the pull
where it's wrong? If not, show us the OS_GPBP 12 call?
Cheers, Ralph.
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK
No comments:
Post a Comment