ref: d68417bc01ef1258e707d95d4785c189fcad5834
parent: 9f18b0f388a38a35ea8920fe3e98c7f8e3a41cf2
author: aiju <devnull@localhost>
date: Sat Mar 17 23:01:21 EDT 2018
satmore: don't try to override user defined variables
--- a/sys/src/libsat/satmore.c
+++ b/sys/src/libsat/satmore.c
@@ -11,11 +11,13 @@
if(s == nil) return 1;
s->scrap = a = satrealloc(s, nil, s->nvar * sizeof(int));
n = 0;
- for(i = 0; i < s->nvar; i++)
+ for(i = 0; i < s->nvar; i++){
+ if((s->var[i].flags & VARUSER) != 0) continue;
switch(s->lit[2*i].val){
case 0: a[n++] = i+1; break;
case 1: a[n++] = -(i+1); break;
}
+ }
if(n > 0)
satadd1(s, a, n);
free(a);