Author: Tobias Stoeckmann Retrieved from: http://paldium.homeunix.org/tobias/wmaker/ Submitted by: Gilbert Ashley <[email protected]>
1 file changed, 2 insertions(+) WINGs/array.c | 2 ++
# HG changeset patch # User John H. Robinson, IV <[email protected]> # Date 1229206686 28800 # Node ID 38d48fca2e9692b3e2ba0d2d2b4b2d05e9a4eda3 # Parent b75b37b0c5d337cec15a28c64b3322bb2817c282 Do not allow a pop from array if no more items are left Author: Tobias Stoeckmann Retrieved from: http://paldium.homeunix.org/tobias/wmaker/ Submitted by: Gilbert Ashley <[email protected]> diff --git a/WINGs/array.c b/WINGs/array.c --- a/WINGs/array.c +++ b/WINGs/array.c @@ -230,6 +230,8 @@ void* WMPopFromArray(WMArray *array) { + wassertr(array->itemCount > 0); + array->itemCount--; return array->items[array->itemCount];
