From fa868ed61cb287f529f86f61775a9de7a7d08cf5 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 27 Sep 2009 23:05:07 +0200 Subject: [PATCH] Bugfix: parser: limit of 10 workspaces is gone --- src/cfgparse.y | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); } } ; -- 2.39.5