From 78f166490699f28f156a041f2a0755f6e71d794b Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Mon, 13 Jan 2014 16:05:14 +0100 Subject: Some fixes in tng_trajectory_init_from_src() diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 71ac2d6..eaf91f3 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -9590,10 +9590,10 @@ tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajector frame_set = &dest->current_trajectory_frame_set; - dest->input_file_path = 0; + strcpy(dest->input_file_path, src->input_file_path); if(src->input_file) { - dest->input_file = fopen(src->input_file_path, "r"); + dest->input_file = fopen(dest->input_file_path, "r"); } else { @@ -9601,10 +9601,10 @@ tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajector } dest->input_file_len = src->input_file_len; - dest->output_file_path = 0; + strcpy(dest->output_file_path, src->output_file_path); if(src->output_file) { - dest->output_file = fopen(src->output_file_path, "w+"); + dest->output_file = fopen(dest->output_file_path, "w+"); } else { -- cgit v0.10.1