[Bug #19587] Fix reset_match_cache
arguments
This commit is contained in:
parent
1b697d7cb5
commit
0ac3f2c20e
Notes:
git
2023-04-12 09:35:57 +00:00
@ -3480,7 +3480,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
|||||||
default:
|
default:
|
||||||
goto unexpected_bytecode_error;
|
goto unexpected_bytecode_error;
|
||||||
}
|
}
|
||||||
reset_match_cache(reg, addr, pbegin, (long)(s - str), msa->match_cache, msa->cache_index_table, msa->num_cache_table ,msa->num_cache_opcode);
|
reset_match_cache(reg, addr, pbegin, (long)(s - str), msa->match_cache, msa->cache_index_table, msa->num_cache_opcode, msa->num_cache_table);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
@ -1750,6 +1750,14 @@ class TestRegexp < Test::Unit::TestCase
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_cache_index_initialize
|
||||||
|
str = 'test1-test2-test3-test4-test_5'
|
||||||
|
re = '^([0-9a-zA-Z\-/]*){1,256}$'
|
||||||
|
100.times do
|
||||||
|
assert !Regexp.new(re).match?(str)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_bug_19273 # [Bug #19273]
|
def test_bug_19273 # [Bug #19273]
|
||||||
pattern = /(?:(?:-?b)|(?:-?(?:1_?(?:0_?)*)?0))(?::(?:(?:-?b)|(?:-?(?:1_?(?:0_?)*)?0))){0,3}/
|
pattern = /(?:(?:-?b)|(?:-?(?:1_?(?:0_?)*)?0))(?::(?:(?:-?b)|(?:-?(?:1_?(?:0_?)*)?0))){0,3}/
|
||||||
assert_equal("10:0:0".match(pattern)[0], "10:0:0")
|
assert_equal("10:0:0".match(pattern)[0], "10:0:0")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user