From b3978513de8ccfbe3f6653ee557bbaa25aed49a7 Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Tue, 6 Dec 2016 13:32:16 -0200 Subject: [PATCH] fixed bug in remove path and in setting max_filename_size in mode 1 --- src/file_operations.f90 | 2 +- src/lovoalign.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file_operations.f90 b/src/file_operations.f90 index 7946644..d7ac584 100644 --- a/src/file_operations.f90 +++ b/src/file_operations.f90 @@ -67,7 +67,7 @@ character(len=200) function remove_path(filename) end do i = i + 1 remove_path(1:ilength-i+1) = remove_path(i:ilength) - do i = ilength-i+1, 200 + do i = ilength-i+2, 200 remove_path(i:i) = achar(32) end do diff --git a/src/lovoalign.f90 b/src/lovoalign.f90 index 5981a0b..219230c 100644 --- a/src/lovoalign.f90 +++ b/src/lovoalign.f90 @@ -178,7 +178,7 @@ program lovoalign ! Read command line parameters if(narg.gt.0) call getpars() - max_filename_size = max(length(basename(protea)),length(basename(proteb))) + max_filename_size = max(length(remove_path(protea)),length(remove_path(proteb))) call outputformats() if(iprint.eq.0) then write(*,header_list) trim(adjustl(basename(protea))), &