diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 22:24:07 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 22:24:07 +0000 |
commit | 39dfa41971533506216b135dce0afcccf5a60ee8 (patch) | |
tree | e59140b1efe237db6b3269da45a7eaf26842b3cd /cmd-list-windows.c | |
parent | c64cf68244dab6801342d45f78d67a64decc2cae (diff) |
Don't count actual struct, don't count size twice.
Diffstat (limited to 'cmd-list-windows.c')
-rw-r--r-- | cmd-list-windows.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-list-windows.c b/cmd-list-windows.c index 74840b84..c460bec3 100644 --- a/cmd-list-windows.c +++ b/cmd-list-windows.c @@ -1,4 +1,4 @@ -/* $Id: cmd-list-windows.c,v 1.11 2007-11-21 22:20:44 nicm Exp $ */ +/* $Id: cmd-list-windows.c,v 1.12 2007-11-21 22:24:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -51,9 +51,9 @@ cmd_list_windows_exec(unused void *ptr, struct cmd_ctx *ctx) w = wl->window; sy = w->screen.hsize + w->screen.dy; - size = sizeof *w; + size = 0; for (i = 0; i < sy; i++) - size += 4 + w->screen.grid_size[i] * 3; + size += w->screen.grid_size[i] * 3; size += sy * (sizeof *w->screen.grid_data); size += sy * (sizeof *w->screen.grid_attr); size += sy * (sizeof *w->screen.grid_colr); |