Skip to content

DEBUG: Fixed potentially empty string in dummylist - #185

Closed
jpeelle wants to merge 2 commits into
automaticanalysis:masterfrom
jpeelle:epifromnifti
Closed

DEBUG: Fixed potentially empty string in dummylist#185
jpeelle wants to merge 2 commits into
automaticanalysis:masterfrom
jpeelle:epifromnifti

Conversation

@jpeelle

@jpeelle jpeelle commented Jan 27, 2019

Copy link
Copy Markdown
Member

With

dummylist = [];
for d=1:numdummies
    dummylist=char(dummylist,fullfile('dummy_scans',[nme ext]));
end

I was ending up with the first entry in dummylist being empty, causing
the module to crash. I added an if statement to avoid concatenation on
the first dummy scan to avoid this.

With

    dummylist = [];
    for d=1:numdummies
        dummylist=char(dummylist,fullfile('dummy_scans',[nme ext]));
    end

I was ending up with the first entry in dummylist being empty, causing
the module to crash. I added an if statement to avoid concatenation on
the first dummy scan to avoid this.
@tiborauer

Copy link
Copy Markdown
Member

Do not you also want to update aamod_diffusionfromnifti accordingly?

@jpeelle

jpeelle commented Feb 12, 2019

Copy link
Copy Markdown
Member Author

Thanks fro catching this. In fact, I think that the strvcat() used by aamod_diffusionfromnifti does not suffer from this problem, so I updated the PR so that aamod_epifromnifti does the same thing.

@tiborauer

Copy link
Copy Markdown
Member

Actually, this is what I have done in my #173: https://github.com/automaticanalysis/automaticanalysis/pull/173/files#diff-d3408a83e1ce4baf274f5914584406cc

@jpeelle jpeelle closed this Feb 15, 2019
tiborauer added a commit that referenced this pull request Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants