diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-12 14:11:04 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-12 14:11:04 -0400 |
commit | ce54e63830421435115663436d120f2319bb711d (patch) | |
tree | 65eeec500b73cd7033cdcddf1c92444ffab66ca7 | |
parent | b85fefe6b6ac4a2e6599e83eef2bb567ebbef41e (diff) | |
download | c++-ce54e63830421435115663436d120f2319bb711d.tar.gz c++-ce54e63830421435115663436d120f2319bb711d.tar.bz2 c++-ce54e63830421435115663436d120f2319bb711d.zip |
fixed bug
-rw-r--r-- | src/analyze_correlations.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/analyze_correlations.cpp b/src/analyze_correlations.cpp index c429c1b..f0fbd15 100644 --- a/src/analyze_correlations.cpp +++ b/src/analyze_correlations.cpp @@ -201,6 +201,10 @@ int main (int argc, char *argv[]) { sprintf(filename_B, "wolff_%lu_E_OO.dat", id); + if (length > M) { + length = M; + } + FILE *file_E = fopen(filename_B, "wb"); fwrite(&M_f, sizeof(double), 1, file_E); fwrite(&mean_E, sizeof(double), 1, file_E); @@ -286,6 +290,10 @@ int main (int argc, char *argv[]) { compute_OO(M, forward_plan, forward_data, reverse_plan, reverse_data); + if (length > M) { + length = M; + } + sprintf(filename_E, "wolff_%lu_E_OO.dat", id); FILE *file_E_new = fopen(filename_E, "wb"); fwrite(&M_f, sizeof(double), 1, file_E_new); |