aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-30 22:45:58 +0200
committerThomas White <taw@physics.org>2014-03-30 22:45:58 +0200
commit40cbfb79fb4056b07ac8a52484f874d801f40aa2 (patch)
treec4ea66ebb8ff9a887a13edf1cc98f205afbfc002
parente50602787cdbf488cf829ca293c9b9f359aa36f8 (diff)
ambigator: Fix output filename
-rw-r--r--src/ambigator.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index d49607a9..7760ab8b 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -849,11 +849,6 @@ int main(int argc, char *argv[])
return 1;
}
- /* Sanitise output filename */
- if ( outfile == NULL ) {
- outfile = strdup("partialator.hkl");
- }
-
if ( s_sym_str == NULL ) {
ERROR("You must specify the input symmetry (with -y)\n");
return 1;
@@ -1090,9 +1085,9 @@ int main(int argc, char *argv[])
STATUS("%i assignments are different from their starting values.\n",
n_dif);
- if ( amb != NULL ) {
+ if ( (outfile != NULL) && (amb != NULL) ) {
write_reindexed_stream(infile, outfile, assignments, amb);
- } else {
+ } else if ( outfile != NULL ) {
ERROR("Can only write stream with known ambiguity operator.\n");
ERROR("Try again with -w\n");
}