Skip to content

Commit

Permalink
Merge pull request #158 from holgern/fix_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
skjerns authored Jan 13, 2022
2 parents ff39881 + 5fdd3e5 commit 4d99bb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyedflib/_extensions/c/edflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
}

p = 0;
if(edfhdr->patient[p]=='X')
if((edfhdr->patient[p]=='X') && (edfhdr->patient[p+1]==' '))
{
edfhdr->plus_patientcode[0] = 0;
p += 2;
Expand Down Expand Up @@ -2549,7 +2549,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
edfhdr->plus_startdate[11] = 0;
p += i + 1;

if(edfhdr->recording[p]=='X')
if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_admincode[0] = 0;
p += 2;
Expand All @@ -2569,7 +2569,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
p += i + 1;
}

if(edfhdr->recording[p]=='X')
if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_technician[0] = 0;
p += 2;
Expand All @@ -2589,7 +2589,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
p += i + 1;
}

if(edfhdr->recording[p]=='X')
if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_equipment[0] = 0;
p += 2;
Expand Down

0 comments on commit 4d99bb9

Please sign in to comment.