[Lemon-commits] Peter Kovacs: Bug fix in DIMACS reader (#607)

Lemon HG hg at lemon.cs.elte.hu
Tue Sep 19 15:26:54 CEST 2017


details:   http://lemon.cs.elte.hu/hg/lemon/rev/f37f0845cf32
changeset: 1372:f37f0845cf32
user:      Peter Kovacs <kpeter [at] inf.elte.hu>
date:      Fri Sep 08 17:02:03 2017 +0200
description:
	Bug fix in DIMACS reader (#607)

diffstat:

 lemon/dimacs.h |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/lemon/dimacs.h b/lemon/dimacs.h
--- a/lemon/dimacs.h
+++ b/lemon/dimacs.h
@@ -339,7 +339,7 @@
                      DimacsDescriptor desc=DimacsDescriptor()) {
     typename Digraph::Node u,v;
     if(desc.type==DimacsDescriptor::NONE) desc=dimacsType(is);
-    if(desc.type!=DimacsDescriptor::MAX || desc.type!=DimacsDescriptor::SP)
+    if(desc.type!=DimacsDescriptor::MAX && desc.type!=DimacsDescriptor::SP)
       throw FormatError("Problem type mismatch");
     _readDimacs(is, g, capacity, u, v, infty, desc);
   }


More information about the Lemon-commits mailing list