[PATCH 1/1] window_resize: fix signed errors

8 views
Skip to first unread message

Thomas Adam

unread,
Mar 15, 2020, 8:20:32 PM3/15/20
to tmux-...@googlegroups.com, Thomas Adam
When setting values, don't confuse int with u_int -- a cast should be
fine here to convert int to u_int.
---
window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/window.c b/window.c
index f911f186..c0395287 100644
--- a/window.c
+++ b/window.c
@@ -423,8 +423,8 @@ window_resize(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel)
ypixel = DEFAULT_YPIXEL;

log_debug("%s: @%u resize %ux%u (%ux%u)", __func__, w->id, sx, sy,
- xpixel == -1 ? w->xpixel : xpixel,
- ypixel == -1 ? w->ypixel : ypixel);
+ xpixel == -1 ? w->xpixel : (u_int)xpixel,
+ ypixel == -1 ? w->ypixel : (u_int)ypixel);
w->sx = sx;
w->sy = sy;
if (xpixel != -1)
--
2.25.1

Nicholas Marriott

unread,
Mar 16, 2020, 4:27:12 AM3/16/20
to Thomas Adam, tmux-users
Applied, thanks
> --
> You received this message because you are subscribed to the Google Groups "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/20200316002010.32507-1-thomas%40xteddy.org.
Reply all
Reply to author
Forward
0 new messages