foobillard++: fix segfault on musl

fixes #43236
This commit is contained in:
hazen2215 2023-11-05 21:50:06 +09:00 committed by Đoàn Trần Công Danh
parent 8882750c13
commit 6b9c446b09
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,19 @@
diff --git a/src/sound_stuff.c b/src/sound_stuff.c
index 32ffed7..7ed946e 100644
--- a/src/sound_stuff.c
+++ b/src/sound_stuff.c
@@ -96,12 +96,12 @@ int strsound ( char s1[] )
int i = 0;
char s[10];
if(strlen(s1) > 4) {
- strcpy(s,&s[strlen(s)-4]);
+ strcpy(s,&s1[strlen(s1)-4]);
while (s[i]) {
s[i] = toupper(s[i]);
++i;
}
- if(strcmp(s,".MP3") || strcmp(s,".OGG")) {
+ if(!strcmp(s,".MP3") || !strcmp(s,".OGG")) {
return(1);
}
}

View File

@ -1,8 +1,7 @@
# Template file for 'foobillard++'
# often segfaults at launch on musl, but not marking broken yet
pkgname=foobillard++
version=3.42beta
revision=4
revision=5
build_style=gnu-configure
configure_args="--enable-standard"
hostmakedepends="automake pkg-config"