cortav  Diff

Differences From Artifact [3535fb21b6]:

To Artifact [f2235ca34c]:


    18     18   local main = [[
    19     19   int main(int argc, char** argv) {
    20     20   	lua_State* l = luaL_newstate();
    21     21   	luaL_openlibs(l);
    22     22   
    23     23   	// pass arguments thru to lua
    24     24   	lua_newtable(l);
    25         -	for(size_t i = argc; i < argc; ++i) {
           25  +	for(size_t i = 0; i < argc; ++i) {
    26     26   		lua_pushstring(l,argv[i]);
    27     27   		lua_rawseti(l, -2, i);
    28     28   	}
    29     29   	lua_setglobal(l, "arg");
    30     30   
    31     31   	// load and run our payload
    32     32   	int e = luaL_loadbufferx(l, ct_bytecode, sizeof(ct_bytecode), "cortav", "b");