Skip to content

Commit b7bf016

Browse files
committed
Change parsing of plane_of_reflection to look for ; instead of 5 characters
1 parent 328d943 commit b7bf016

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mcstas-comps/contrib/Monochromator_bent_complex.comp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ INITIALIZE
132132
mono_arr.verbosity = verbose; // [#]
133133

134134
// Separate the string into individual crystals
135-
// If only 5 characters are given, and number of crystals are larger than 1,
136-
// assume that they want to use the same plane on all the crystals.
135+
// If no semicolon is present, parse the string as a single plane of reflection
136+
// and apply that to all crystals
137137

138138
char* input_string = NULL;
139139

140-
if (strlen (plane_of_reflection) == 5 && n_crystals > 1) {
140+
if (strchr (plane_of_reflection, ";") == NULL && n_crystals > 1) {
141141
// Apply the same plane to all crystals
142142
input_string = repeat_with_semicolon (plane_of_reflection, n_crystals);
143143
} else {

0 commit comments

Comments
 (0)