diff --git a/pyedflib/_extensions/c/edflib.c b/pyedflib/_extensions/c/edflib.c index 1ca9c15..8820bb0 100644 --- a/pyedflib/_extensions/c/edflib.c +++ b/pyedflib/_extensions/c/edflib.c @@ -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; @@ -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; @@ -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; @@ -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;