ecopcr: added warnings and check of primer length (related to #75)

This commit is contained in:
Celine Mercier
2020-04-05 18:40:56 +02:00
parent 0b98371688
commit b9f68c76c8
3 changed files with 14 additions and 5 deletions

View File

@ -739,6 +739,14 @@ int obi_ecopcr(const char* i_dms_name,
return -1;
}
// Check primer length (apat lib limits to 32)
if ((strlen(primer1) > 32) || (strlen(primer2) > 32))
{
obi_set_errno(OBI_ECOPCR_ERROR);
obidebug(1, "\nError: primer length can not be greater than 32 (primers %s, %s)", primer1, primer2);
return -1;
}
o1 = buildPattern(primer1, error_max);
o2 = buildPattern(primer2, error_max);