mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
Use correct length for strncmp comparison
This commit is contained in:
parent
9425ce2fba
commit
714559812e
|
@ -292,7 +292,7 @@ static uint32_t render_status_block(struct render_context *ctx,
|
|||
}
|
||||
|
||||
double offset = 0;
|
||||
if (strncmp(block->align, "left", 5) == 0) {
|
||||
if (strncmp(block->align, "left", 4) == 0) {
|
||||
offset = x_pos;
|
||||
} else if (strncmp(block->align, "right", 5) == 0) {
|
||||
offset = x_pos + width - text_width;
|
||||
|
|
Loading…
Reference in a new issue