aboutsummaryrefslogtreecommitdiffstats
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 553186135b..3b75545bf0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3,7 +3,7 @@
**********************************************************************/
/*-
* Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
- * Copyright (c) 2011-2012 K.Takata <kentkt AT csc DOT jp>
+ * Copyright (c) 2011-2013 K.Takata <kentkt AT csc DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -2219,7 +2219,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
continue;
}
#ifdef USE_CRNL_AS_LINE_TERMINATOR
- else if (ss < end) {
+ else if (IS_NEWLINE_CRLF(option)
+ && ONIGENC_IS_MBC_CRNL(encode, s, end)) {
ss += enclen(encode, ss, end);
if (ON_STR_END(ss)) {
MOP_OUT;
@@ -4065,7 +4066,9 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end,
}
}
else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_ML)) {
- goto begin_position;
+ if (! (reg->anchor & ANCHOR_LOOK_BEHIND)) {
+ goto begin_position;
+ }
}
}
else if (str == end) { /* empty string */