From 3f5b9b8af6a499fd78201ecf67ad570d4fdd1d93 Mon Sep 17 00:00:00 2001 From: steeve Date: Thu, 28 Apr 2016 20:01:03 -0700 Subject: [PATCH] mlrAnatDBPut-fix Start writing old entries from line 2 of subjectPageScan because line 1 entries are empty. This causes the code to crash when creating a new SID.txt file. --- mrLoadRet/PluginAlt/mlrAnatDB/mlrAnatDBPut.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mrLoadRet/PluginAlt/mlrAnatDB/mlrAnatDBPut.m b/mrLoadRet/PluginAlt/mlrAnatDB/mlrAnatDBPut.m index ff802e3a5..a504cf2f2 100644 --- a/mrLoadRet/PluginAlt/mlrAnatDB/mlrAnatDBPut.m +++ b/mrLoadRet/PluginAlt/mlrAnatDB/mlrAnatDBPut.m @@ -436,7 +436,8 @@ fprintf(f,'|%s |%s |%s |%s |%i |\n',mlrAnatDBGetUsername,fileType,datestr(now),comments,branchNum); end % write old entries -for iLine = 1:length(subjectPageScan{1}) +%start from line 2 because line 1 entries are empty +for iLine = 2:length(subjectPageScan{1}) if subjectPageScan{3}{iLine}(1) == '[' % print with a link: [[ ]] fprintf(f,'|%s |[%s] |%s |%s |%i |\n',subjectPageScan{2}{iLine},strtrim(subjectPageScan{3}{iLine}),subjectPageScan{4}{iLine},subjectPageScan{5}{iLine},subjectPageScan{6}(iLine));