Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/c_geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,18 @@ void c_geometry::parse_geometry_card_line(const char* line_buf, char *gm,
return;
}
}

/*
* Write the parsed fields back on normal loop exit. A card carrying more
* numeric fields than the two integers and seven reals this reader consumes
* leaves line_idx short of the terminator, so the in-loop end-of-string
* writes never fire; without this the caller's reused parse state retains the
* previous card's values.
*/
*in_i1= integer_params[0]; *in_i2= integer_params[1];
*in_x1= real_params[0]; *in_y1= real_params[1]; *in_z1= real_params[2];
*in_x2= real_params[3]; *in_y2= real_params[4]; *in_z2= real_params[5];
*in_rad= real_params[6];
}

void c_geometry::read_geometry_card(FILE* input_fp, char *gm,
Expand Down
Loading