Update inpfile.c
Trying to isolate bug
@@ -121,8 +121,8 @@ void saveauxdata(Project *pr, FILE *f)
InFile = NULL;
}
-void write_demands(Project *pr, FILE *f) {
+void write_demands(Project *pr, FILE *f) {
int i, j;
Snode *node = NULL;
@@ -142,6 +142,7 @@ void write_demands(Project *pr, FILE *f) {
node = &net->Node[i];
if (node->D) {
for (lnode = first_list(node->D); done_list(lnode); lnode = next_list(lnode)) {
+ if (lnode) {
sprintf(s, " %-31s %14.6f", node->ID, ucf * get_base_demand(lnode));
if
@@ -159,6 +160,8 @@ void write_demands(Project *pr, FILE *f) {
}
}
}
+}
+
int saveinpfile(Project *pr, const char *fname)
/*
