1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

regex: fix a bug, update docs, explain the assumptions of the regex module (#7629)

This commit is contained in:
penguindark
2020-12-28 11:43:03 +01:00
committed by GitHub
parent 2946673bc2
commit a98adbb3a4
3 changed files with 18 additions and 3 deletions

View File

@@ -1960,7 +1960,7 @@ pub fn (mut re RE) match_base(in_txt byteptr, in_txt_len int ) (int,int) {
continue
}
if re.prog[state.pc].dot_check_pc >= 0 {
if re.prog[state.pc].dot_check_pc >= 0 && re.prog[state.pc].rep >= re.prog[state.pc].rep_min {
// load the char
//ch_t, _ := re.get_charb(in_txt, state.i+char_len)
ch_t := ch
@@ -2338,6 +2338,7 @@ pub fn (mut re RE) match_base(in_txt byteptr, in_txt_len int ) (int,int) {
//println("find return")
return state.first_match, state.i
} else {
//println("Here!!")
return 0, state.i
}
}