summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wolff.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wolff.c b/src/wolff.c
index 2bd9c7d..60861b2 100644
--- a/src/wolff.c
+++ b/src/wolff.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[]) {
}
update_meas(E, s->E);
- q_t max_M_i = 0;
+ int max_M_i = -1;
double max_M = 0;
for (q_t i = 0; i < q; i++) {
@@ -168,10 +168,12 @@ int main(int argc, char *argv[]) {
}
}
- for (q_t i = 0; i < q; i++) {
- update_meas(sM[max_M_i][i], s->M[i]);
+ if (max_M_i != -1) {
+ for (q_t i = 0; i < q; i++) {
+ update_meas(sM[max_M_i][i], s->M[i]);
+ }
+ update_meas(sE[max_M_i], s->E);
}
- update_meas(sE[max_M_i], s->E);
diff = fabs(sM[0][0]->dc / sM[0][0]->c);