sambayless / monosat

MonoSAT - An SMT solver for Monotonic Theories
MIT License
106 stars 29 forks source link

Quick bugfix for addUndirectedEdge(int,int), to be checked and tested #20

Closed fraimondi closed 5 years ago

fraimondi commented 5 years ago

Calling Graph.addUndiretedEdge(int,int) gives me a buffer overflow error. The implementation seems to call itself recursively (see line 849 of Graph.java). The naming of the "reversed" edge seems to create problems, too (line 873 and line 921 of Graph.java).

These changes fix my problems, but I spent only a very limited time on this, please check them and apologies in advance if I missed some important point... :-)

Thanks!

sambayless commented 5 years ago

Yikes, good catch! And thanks also for taking the extra time to submit a patch.

sambayless commented 5 years ago

Resolved by https://github.com/sambayless/monosat/commit/921958541e327530fdaf56c0d62e94f681219bdf

Thanks again for pointing this out!