summaryrefslogtreecommitdiffstats
path: root/libkmid
diff options
context:
space:
mode:
Diffstat (limited to 'libkmid')
-rw-r--r--libkmid/Makefile.am2
-rw-r--r--libkmid/fmout.cc12
2 files changed, 7 insertions, 7 deletions
diff --git a/libkmid/Makefile.am b/libkmid/Makefile.am
index 5d64b0fcf..8db9d5369 100644
--- a/libkmid/Makefile.am
+++ b/libkmid/Makefile.am
@@ -18,7 +18,7 @@ libkmid_la_SOURCES = midiout.cc player.cc track.cc midimapper.cc \
libkmid.cc
libkmid_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 0:95 -no-undefined
-libkmid_la_LIBADD = $(LIBASOUND) ../kdecore/libkdecore.la
+libkmid_la_LIBADD = $(LIBASOUND) ../kdecore/libkdecore.la $(LIB_QT)
DOXYGEN_REFERENCES = kdecore
include ../admin/Doxyfile.am
diff --git a/libkmid/fmout.cc b/libkmid/fmout.cc
index c4af93dcd..bce421f81 100644
--- a/libkmid/fmout.cc
+++ b/libkmid/fmout.cc
@@ -127,8 +127,8 @@ void FMOut::initDev (void)
void FMOut::loadFMPatches(void)
{
#ifdef HAVE_OSS_SUPPORT
- char patchesfile[PATH_MAX];
- char drumsfile[PATH_MAX];
+ char patchesfile[strlen(FMPatchesDirectory)+7+1];
+ char drumsfile[strlen(FMPatchesDirectory)+9+1];
int size;
struct sbi_instrument instr;
char tmp[60];
@@ -141,12 +141,12 @@ void FMOut::loadFMPatches(void)
if (opl==3)
{
- snprintf(patchesfile, PATH_MAX, "%s/std.o3",FMPatchesDirectory);
+ snprintf(patchesfile, sizeof(patchesfile), "%s/std.o3",FMPatchesDirectory);
size=60;
}
else
{
- snprintf(patchesfile, PATH_MAX, "%s/std.sb",FMPatchesDirectory);
+ snprintf(patchesfile, sizeof(patchesfile), "%s/std.sb",FMPatchesDirectory);
size=52;
}
fh=fopen(patchesfile,"rb");
@@ -171,11 +171,11 @@ void FMOut::loadFMPatches(void)
if (opl==3)
{
- snprintf(drumsfile, PATH_MAX, "%s/drums.o3",FMPatchesDirectory);
+ snprintf(drumsfile, sizeof(drumsfile), "%s/drums.o3",FMPatchesDirectory);
}
else
{
- snprintf(drumsfile, PATH_MAX, "%s/drums.sb",FMPatchesDirectory);
+ snprintf(drumsfile, sizeof(drumsfile), "%s/drums.sb",FMPatchesDirectory);
}
fh=fopen(drumsfile,"rb");