diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-10-27 00:55:22 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-10-27 00:55:22 +0300 |
commit | b97e18ce5726ceff1e0a55ebe296fe89f411b347 (patch) | |
tree | 732f33fd7405aaecbb1172307a55052f0ba269ec /cord | |
parent | 8b58fa8356f77f64e9525e745d090108c20a528e (diff) | |
download | bdwgc-b97e18ce5726ceff1e0a55ebe296fe89f411b347.tar.gz |
Fix conditional expression in pos_fetch, next non-macro definitions (cord)
* cord/cordbscs.c (CORD_pos_fetch, CORD_next): Match the conditional
expression of the macro definition (of the same name) in cord_pos.h.
Diffstat (limited to 'cord')
-rw-r--r-- | cord/cordbscs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c index 6db4ef27..38b1c958 100644 --- a/cord/cordbscs.c +++ b/cord/cordbscs.c @@ -875,7 +875,7 @@ void CORD__prev(register CORD_pos p) char CORD_pos_fetch(register CORD_pos p) { - if (p[0].cur_start <= p[0].cur_pos && p[0].cur_pos < p[0].cur_end) { + if (p[0].cur_end != 0) { return(p[0].cur_leaf[p[0].cur_pos - p[0].cur_start]); } else { return(CORD__pos_fetch(p)); @@ -884,7 +884,7 @@ char CORD_pos_fetch(register CORD_pos p) void CORD_next(CORD_pos p) { - if (p[0].cur_pos < p[0].cur_end - 1) { + if (p[0].cur_pos + 1 < p[0].cur_end) { p[0].cur_pos++; } else { CORD__next(p); |