Skip to content

Commit b71a440

Browse files
committed
[FileFormats.LP] fix for regex match on very long lines
1 parent 14d5af5 commit b71a440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FileFormats/LP/LP.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ function _parse_section(
809809
cache.constraint_name = "R$(cache.num_constraints)"
810810
end
811811
end
812-
if cache.indicator === nothing
812+
if cache.indicator === nothing && occursin("->", line)
813813
if (m = match(r"\s*(.+?)\s*=\s*(0|1)\s*->(.+)", line)) !== nothing
814814
z = _get_variable_from_name(model, cache, String(m[1]))
815815
cond = m[2] == "0" ? MOI.ACTIVATE_ON_ZERO : MOI.ACTIVATE_ON_ONE

0 commit comments

Comments
 (0)