summaryrefslogtreecommitdiff
path: root/cord/cordbscs.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 15:28:12 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 15:28:12 +0200
commit111a44f98adde07d205c92656ad9b935ca2a39a8 (patch)
tree8a0cb4e60f636fd09dd0d2e1a3a7f3a4ac0a1bb0 /cord/cordbscs.c
parentf3632431e72d48bc7772b0752e29bb1e2a0901c6 (diff)
gc6.2 tarball importgc6_2
Diffstat (limited to 'cord/cordbscs.c')
-rw-r--r--cord/cordbscs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c
index 9fc894d..d83f406 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);
+ }
}
}