summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 78126da285..00c139cb91 100644
--- a/string.c
+++ b/string.c
@@ -1967,11 +1967,11 @@ trnext(t)
for (;;) {
if (!t->gen) {
if (t->p == t->pend) return -1;
- t->now = *(USTR)t->p++;
if (t->p < t->pend - 1 && *t->p == '\\') {
t->p++;
}
- else if (t->p < t->pend - 1 && *t->p == '-') {
+ t->now = *(USTR)t->p++;
+ if (t->p < t->pend - 1 && *t->p == '-') {
t->p++;
if (t->p < t->pend) {
if (t->now > *(USTR)t->p) {