Switch to strncasecmp
All checks were successful
k4 Build Test / do_the_build (push) Successful in 52s

This commit is contained in:
mid 2025-07-13 10:15:02 +03:00
parent f4cf597a95
commit b32671567e

View File

@ -1,6 +1,5 @@
#include"k3mix.h"
#define _GNU_SOURCE
#include<vorbis/vorbisfile.h>
#include<string.h>
#include<stdlib.h>
@ -9,6 +8,10 @@
#include<assert.h>
#include"k3.h"
#ifdef _WIN32
#define strncasecmp _strnicmp
#endif
static uint32_t FinalSampleRate;
static uint8_t FinalChannels;
@ -31,7 +34,7 @@ struct k3MixSource *k3MixSourceFile(const char *path) {
ret->looppoint = 0;
for(size_t ci = 0; ci < ret->vf.vc->comments; ci++) {
if(strcasestr(ret->vf.vc->user_comments[ci], "looppoint=") == ret->vf.vc->user_comments[ci]) {
if(strncasecmp(ret->vf.vc->user_comments[ci], "looppoint=", 10) == 0) {
ret->looppoint = strtol(ret->vf.vc->user_comments[ci] + 10, NULL, 0);
k3Log(k3_DEBUG, "%s has loop point %lu", path, ret->looppoint);
}