[tag] Fix tag add checking

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-27 16:20:18 +02:00
parent 60c8a3593d
commit 4b3e7f766c
1 changed files with 2 additions and 2 deletions

4
tag.c
View File

@ -259,9 +259,9 @@ luaA_tag_add(lua_State *L)
luaA_checkscreen(screen); luaA_checkscreen(screen);
for(i = 0; i < globalconf.screens_info->nscreen; i++) for(i = 0; i < globalconf.screens_info->nscreen; i++)
for(t = globalconf.screens[screen].tags; t; t = t->next) for(t = globalconf.screens[i].tags; t; t = t->next)
if(*tag == t) if(*tag == t)
luaL_error(L, "tag already on screen %d", i); luaL_error(L, "tag already on screen %d", i + 1);
(*tag)->screen = screen; (*tag)->screen = screen;
tag_append_to_screen(*tag, screen); tag_append_to_screen(*tag, screen);