diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 17:28:12 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 17:28:12 +0400 |
commit | 111a44f98adde07d205c92656ad9b935ca2a39a8 (patch) | |
tree | 8a0cb4e60f636fd09dd0d2e1a3a7f3a4ac0a1bb0 /cord/cordbscs.c | |
parent | f3632431e72d48bc7772b0752e29bb1e2a0901c6 (diff) | |
download | bdwgc-111a44f98adde07d205c92656ad9b935ca2a39a8.tar.gz |
gc6.2 tarball importgc6_2
Diffstat (limited to 'cord/cordbscs.c')
-rw-r--r-- | cord/cordbscs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c index 9fc894d4..d83f4067 100644 --- a/cord/cordbscs.c +++ b/cord/cordbscs.c @@ -219,7 +219,7 @@ CORD CORD_cat_char_star(CORD x, const char * y, size_t leny) result->len = result_len; result->left = x; result->right = y; - if (depth > MAX_DEPTH) { + if (depth >= MAX_DEPTH) { return(CORD_balance((CORD)result)); } else { return((CORD) result); @@ -260,7 +260,11 @@ CORD CORD_cat(CORD x, CORD y) result->len = result_len; result->left = x; result->right = y; - return((CORD) result); + if (depth >= MAX_DEPTH) { + return(CORD_balance((CORD)result)); + } else { + return((CORD) result); + } } } |