| 518 while (si < elem_count) { |
518 while (si < elem_count) { |
| 519 // find a chain of elements that can be copied |
519 // find a chain of elements that can be copied |
| 520 size_t copy_len = 1, skip_len = 0; |
520 size_t copy_len = 1, skip_len = 0; |
| 521 { |
521 { |
| 522 const char *left_src = src; |
522 const char *left_src = src; |
| 523 while (si + copy_len < elem_count) { |
523 while (si + copy_len + skip_len < elem_count) { |
| 524 const char *right_src = left_src + elem_size; |
524 const char *right_src = left_src + elem_size; |
| 525 int d = cmp_func(left_src, right_src); |
525 int d = cmp_func(left_src, right_src); |
| 526 if (d < 0) { |
526 if (d < 0) { |
| 527 if (skip_len > 0) { |
527 if (skip_len > 0) { |
| 528 // new larger element found; |
528 // new larger element found; |