diff options
author | sabetts <sabetts> | 2006-01-03 21:34:20 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-01-03 21:34:20 +0000 |
commit | 1d3b753b428842fc9c0bdc6d9ccc9e2289239ffa (patch) | |
tree | 99e3b68f6d43a05ec936912c1a101eca88584cc6 /src/number.c | |
parent | 4d51c49a9428837d6adc638f442717178b2d2b2f (diff) | |
download | ratpoison-1d3b753b428842fc9c0bdc6d9ccc9e2289239ffa.zip |
* src/number.c (numset_add_num): store the ret val of
numset_find_empty_cell in a variable and use it as an index into
the numbers_taken array.
* src/actions.c (cmd_curframe): return the frame number in
non-interactive mode.
* src/split.c (cleanup_frame): in the maxsize windows are
transients check either the width or height must be less than the
screen width/height (just like in windows.c).
Diffstat (limited to 'src/number.c')
-rw-r--r-- | src/number.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/number.c b/src/number.c index 7fb48c9..ee96b42 100644 --- a/src/number.c +++ b/src/number.c @@ -71,12 +71,16 @@ numset_find_empty_cell (struct numset *ns) int numset_add_num (struct numset *ns, int n) { + int ec; + PRINT_DEBUG(("ns=%p add_num %d\n", ns, n)); if (numset_num_is_taken (ns, n)) return 0; /* failed. */ - - ns->numbers_taken[numset_find_empty_cell(ns)] = n; + /* numset_find_empty_cell calls realloc on numbers_taken. So store + the ret val in ec then use ec as an index into the array. */ + ec = numset_find_empty_cell(ns); + ns->numbers_taken[ec] = n; return 1; /* success! */ } |