From 677daa109a8bc7c4870e5b030209d4ffc52963cb Mon Sep 17 00:00:00 2001 From: Lewin Probst <info@emirror.de> Date: Sat, 15 Apr 2023 12:19:58 +0200 Subject: [PATCH] fix: Added missing parsing to double of referenceStart and referenceEnd while validating user input --- VERSION | 2 +- .../+track/+parameter/validateCombinationsInput.m | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index e8a4e6b..b6e8154 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -329 \ No newline at end of file +330 \ No newline at end of file diff --git a/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m b/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m index a2ad31a..4c2b674 100644 --- a/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m +++ b/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m @@ -29,12 +29,16 @@ if any(isempty(pCombinationsTable.trackingMethod)) ... return; end -if any(cellfun(@(x) length(strsplit(x)), pCombinationsTable.referencePosition) ~= 2) +referenceStart = cellfun(@(x) strsplit(x), pCombinationsTable.referencePosition, 'UniformOutput', false); +referenceStart = cell2mat(cellfun(@(x) str2double(x), referenceStart, 'UniformOutput', false)); +if any(length(referenceStart) ~= 2) || any(isnan(referenceStart)) message = '(Reference) Position START column contains at least one error. Please double check this column.'; return; end -if any(cellfun(@(x) length(strsplit(x)), pCombinationsTable.referencePositionEnd) ~= 2) +referenceEnd = cellfun(@(x) strsplit(x), pCombinationsTable.referencePositionEnd, 'UniformOutput', false); +referenceEnd = cell2mat(cellfun(@(x) str2double(x), referenceEnd, 'UniformOutput', false)); +if any(length(referenceEnd) ~= 2) || any(isnan(referenceEnd)) message = '(Reference) Position END column contains at least one error. Please double check this column.'; return; end -- GitLab