[conv1d] set_padding_mode case insensitive
authorPaul Brossier <piem@piem.org>
Tue, 29 Jan 2019 02:16:50 +0000 (03:16 +0100)
committerPaul Brossier <piem@piem.org>
Wed, 29 Dec 2021 16:52:02 +0000 (11:52 -0500)
src/ai/conv1d.c

index d4c4997..586c521 100644 (file)
@@ -323,9 +323,9 @@ uint_t aubio_conv1d_set_padding_mode(aubio_conv1d_t *c,
     const char_t *padding_mode)
 {
   AUBIO_ASSERT(c && padding_mode);
-  if (strncmp(padding_mode, "same", PATH_MAX) == 0) {
+  if (strncasecmp(padding_mode, "same", PATH_MAX) == 0) {
     c->padding_mode = PAD_SAME;
-  } else if (strncmp(padding_mode, "valid", PATH_MAX) == 0) {
+  } else if (strncasecmp(padding_mode, "valid", PATH_MAX) == 0) {
     c->padding_mode = PAD_VALID;
   } else {
     return AUBIO_FAIL;