diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/group.c | 2 | ||||
-rw-r--r-- | src/include/group.h | 2 | ||||
-rw-r--r-- | src/read_cfg.c | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/group.c b/src/group.c index e5c3373..95d8605 100644 --- a/src/group.c +++ b/src/group.c @@ -55,7 +55,7 @@ char *get_gflags(GROUP *g){ return g->flags; } -void set_gflags(GROUP *g, char *p){ +void set_gflags(GROUP *g, const char *p){ assert(g != NULL); strcpy(g->flags, p); } diff --git a/src/include/group.h b/src/include/group.h index 751b629..bad33a5 100644 --- a/src/include/group.h +++ b/src/include/group.h @@ -17,7 +17,7 @@ void set_gprog(GROUP *g, const char *p); char *get_gflags(GROUP *g); -void set_gflags(GROUP *g, char *p); +void set_gflags(GROUP *g, const char *p); ENTRY **get_gentries(GROUP *g); diff --git a/src/read_cfg.c b/src/read_cfg.c index d9491bb..05146aa 100644 --- a/src/read_cfg.c +++ b/src/read_cfg.c @@ -188,10 +188,16 @@ void add_groups(lua_State *L, int table_stack_index, GROUP ***g) { // set the launcher, if applicable lua_pushstring(L, "Launcher"); lua_gettable(L, group_table_index); - printf("Found launcher: %s\n", lua_tostring(L, -1)); if(lua_type(L, -1) == LUA_TSTRING) { set_gprog((*g)[i], lua_tostring(L, -1)); } + + // set the launcher flags, if applicable + lua_pushstring(L, "Flags"); + lua_gettable(L, group_table_index); + if(lua_type(L, -1) == LUA_TSTRING) { + set_gflags((*g)[i], lua_tostring(L, -1)); + } } } // pop the top of the stack down to the key of the group |