]> sigrok.org Git - libsigrok.git/blobdiff - src/input/wav.c
Build: Include <config.h> first in all source files
[libsigrok.git] / src / input / wav.c
index 271bacef19b9162aed32ab396a347579cbcee87b..2f01f7d824e1808afb5998175f31c9ffeb3c542f 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -24,7 +25,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <stdint.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "input/wav"
@@ -165,8 +166,7 @@ static int find_data_chunk(GString *buf, int initial_offset)
                        /* Skip into the samples. */
                        return offset + 8;
                for (i = 0; i < 4; i++) {
-                       if (!isalpha(buf->str[offset + i])
-                                       && !isascii(buf->str[offset + i])
+                       if (!isalnum(buf->str[offset + i])
                                        && !isblank(buf->str[offset + i]))
                                /* Doesn't look like a chunk ID. */
                                return -1;