mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Fix #158
This commit is contained in:
parent
495541484c
commit
b85d8c89ce
6
peglib.h
6
peglib.h
@ -3732,9 +3732,9 @@ private:
|
|||||||
if (!ret) { return nullptr; }
|
if (!ret) { return nullptr; }
|
||||||
|
|
||||||
// Check infinite loop
|
// Check infinite loop
|
||||||
for (auto &[name, rule] : grammar) {
|
{
|
||||||
DetectInfiniteLoop vis(rule.s_, name);
|
DetectInfiniteLoop vis(data.start_pos, data.start);
|
||||||
rule.accept(vis);
|
start_rule.accept(vis);
|
||||||
if (vis.has_error) {
|
if (vis.has_error) {
|
||||||
if (log) {
|
if (log) {
|
||||||
auto line = line_info(s, vis.error_s);
|
auto line = line_info(s, vis.error_s);
|
||||||
|
Loading…
Reference in New Issue
Block a user