Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error when checking workspace_layout arguments #1119

Merged
merged 2 commits into from
Mar 18, 2017

Conversation

oranenj
Copy link
Contributor

@oranenj oranenj commented Mar 18, 2017

If the configuration file contains:

workspace_layout auto left

or anything similar, the code checking the configuration will ignore the command and output an error.

The reason is easily confirmed with GDB:

(gdb) break cmd_workspace_layout
Breakpoint 1 at 0x16240: file /usr/src/debug/sway-master/sway/commands/workspace_layout.c, line 5.
(gdb) run
Starting program: /usr/bin/sway 
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.24-4.fc25.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 8799.
Detaching after fork from child process 8800.

Breakpoint 1, cmd_workspace_layout (argc=2, argv=0x559a6f093d98)
    at /usr/src/debug/sway-master/sway/commands/workspace_layout.c:5
5	struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
(gdb) print argv[0]
$1 = 0x559a6f0942a0 "auto"
(gdb) print argv[1]
$2 = 0x559a6f093780 "left"

@ddevault
Copy link
Contributor

Can you associate the email address you committed with to your GitHub account?

@oranenj
Copy link
Contributor Author

oranenj commented Mar 18, 2017

Oh, I committed it with the wrong (work) identity. Let me fix that.

@ddevault ddevault merged commit 5c3d318 into swaywm:master Mar 18, 2017
@ddevault
Copy link
Contributor

Thanks!

ddevault added a commit that referenced this pull request Apr 3, 2017
Fix off-by-one error when checking workspace_layout arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants