Skip to content

Commit 1966e9d

Browse files
pradeebanCopilot
andauthored
Update concore_iport.m
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0371a28 commit 1966e9d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

concore_iport.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
% Safe numeric parsing (replaces unsafe eval)
1111
port_str = strtrim(s(i+length(target):j-1));
1212
result = sscanf(port_str, '%f');
13+
if isempty(result)
14+
% Keep the initialized default value (0) if parsing fails
15+
result = 0;
16+
end
1317
return
1418
end
1519
end

0 commit comments

Comments
 (0)