Skip to content

Commit

Permalink
Bugfix: Add EEG positions: Match with case-sensitive search first
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Feb 15, 2023
1 parent c58cec1 commit ca3f702
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/license.html
Expand Up @@ -5,7 +5,7 @@
<body alink="#fff000" link="#fff000" vlink="#fff000">
<h4><span style="font-family: Arial Black; color: #ffffff;"><strong>THERE IS NO UNDO BUTTON!<BR>SET UP A <FONT color=red>BACKUP</FONT> OF YOUR DATABASE</strong></span></h4>
<HR>
<!-- LICENCE_START -->Version: 3.230214 (14-Feb-2023)<br>
<!-- LICENCE_START -->Version: 3.230215 (15-Feb-2023)<br>
<span style="font-style: italic;">COPYRIGHT &copy; 2000-2023
USC &amp; McGill University.<br>
</span>
Expand Down
2 changes: 1 addition & 1 deletion doc/version.txt
@@ -1,2 +1,2 @@
% Brainstorm
% v. 3.230214 (14-Feb-2023)
% v. 3.230215 (15-Feb-2023)
6 changes: 5 additions & 1 deletion toolbox/sensors/channel_add_loc.m
Expand Up @@ -127,7 +127,11 @@ function channel_add_loc(iStudies, LocChannelFile, isInteractive, isMni)
% Replace "'" with "p"
chName = strrep(chName, '''', 'p');
% Look for the exact channel name
idef = find(strcmpi(chName, locChanNames));
idef = find(strcmp(chName, locChanNames));
% If channel name not found, search with different case
if isempty(idef)
idef = find(strcmpi(chName, locChanNames));
end

% If not found, look for an alternate version (with or without trailing zeros...)
if isempty(idef) && ismember(lower(chName(1)), 'abcdefghijklmnopqrstuvwxyz') && ismember(lower(chName(end)), '0123456789')
Expand Down

0 comments on commit ca3f702

Please sign in to comment.