mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
Fixed bugs in inverse
This commit is contained in:
parent
6d575967d4
commit
81f180a069
@ -31,7 +31,7 @@ inverse_models(void)
|
|||||||
* for any marked "new".
|
* for any marked "new".
|
||||||
*/
|
*/
|
||||||
int n/*, print1*/;
|
int n/*, print1*/;
|
||||||
char string[MAX_LENGTH];
|
char string[MAX_LENGTH] = "";
|
||||||
if (count_inverse <= 0) return OK;
|
if (count_inverse <= 0) return OK;
|
||||||
// Revert to previous headings after inverse modeling
|
// Revert to previous headings after inverse modeling
|
||||||
std::vector<std::string> old_headings;
|
std::vector<std::string> old_headings;
|
||||||
@ -54,10 +54,10 @@ inverse_models(void)
|
|||||||
*/
|
*/
|
||||||
if (inverse[n].pat != NULL)
|
if (inverse[n].pat != NULL)
|
||||||
{
|
{
|
||||||
Utilities::strcat_safe(string, MAX_LENGTH, inverse[n].pat);
|
Utilities::strcpy_safe(string, MAX_LENGTH, inverse[n].pat);
|
||||||
if (replace(".pat", ".pat", string) != TRUE)
|
if (replace(".pat", ".pat", string) != TRUE)
|
||||||
{
|
{
|
||||||
Utilities::strcat_safe(string, strlen(string), ".pat");
|
Utilities::strcat_safe(string, MAX_LENGTH, ".pat");
|
||||||
}
|
}
|
||||||
netpath_file = fopen(string, "w");
|
netpath_file = fopen(string, "w");
|
||||||
if (netpath_file == NULL)
|
if (netpath_file == NULL)
|
||||||
@ -4174,11 +4174,11 @@ print_total_multi(FILE * l_netpath_file, cxxSolution *solution_ptr,
|
|||||||
LDBLE sum;
|
LDBLE sum;
|
||||||
int i, found;
|
int i, found;
|
||||||
|
|
||||||
Utilities::strcat_safe(elts[0], MAX_LENGTH, elt0);
|
Utilities::strcpy_safe(elts[0], MAX_LENGTH, elt0);
|
||||||
Utilities::strcat_safe(elts[1], MAX_LENGTH, elt1);
|
Utilities::strcpy_safe(elts[1], MAX_LENGTH, elt1);
|
||||||
Utilities::strcat_safe(elts[2], MAX_LENGTH, elt2);
|
Utilities::strcpy_safe(elts[2], MAX_LENGTH, elt2);
|
||||||
Utilities::strcat_safe(elts[3], MAX_LENGTH, elt3);
|
Utilities::strcpy_safe(elts[3], MAX_LENGTH, elt3);
|
||||||
Utilities::strcat_safe(elts[4], MAX_LENGTH, elt4);
|
Utilities::strcpy_safe(elts[4], MAX_LENGTH, elt4);
|
||||||
|
|
||||||
|
|
||||||
sum = 0;
|
sum = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user