From: Michael Stapelberg Date: Sun, 27 Sep 2009 21:05:07 +0000 (+0200) Subject: Bugfix: parser: limit of 10 workspaces is gone X-Git-Tag: 3.d~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fa868ed61cb287f529f86f61775a9de7a7d08cf5;p=i3%2Fi3 Bugfix: parser: limit of 10 workspaces is gone --- diff --git a/src/cfgparse.y b/src/cfgparse.y index 7c0bf900..f41a69b0 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -313,22 +313,23 @@ workspace: TOKWORKSPACE WHITESPACE NUMBER WHITESPACE TOKSCREEN WHITESPACE screen workspace_name { int ws_num = $3; - if (ws_num < 1 || ws_num > 10) { + if (ws_num < 1) { LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num); } else { - workspaces[ws_num - 1].preferred_screen = sstrdup($7); + Workspace *ws = workspace_get(ws_num - 1); + ws->preferred_screen = sstrdup($7); if ($8 != NULL) - workspace_set_name(&(workspaces[ws_num - 1]), $8); + workspace_set_name(ws, $8); } } | TOKWORKSPACE WHITESPACE NUMBER workspace_name { int ws_num = $3; - if (ws_num < 1 || ws_num > 10) { + if (ws_num < 1) { LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num); } else { if ($4 != NULL) - workspace_set_name(&(workspaces[ws_num - 1]), $4); + workspace_set_name(workspace_get(ws_num - 1), $4); } } ;