lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>             char name[512];  // yes I know, arbitrary constant
>             strncpy(name,iev->name,iev->len);
>             name[iev->len] = '\0';
>             lua_pushstring(L,name);

You can simply use lua_pushlstring(L,iev->name,iev->len).