diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 03:46:01 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 03:46:01 +0000 |
commit | 865f314dd5ed55508f45a32973b709b79a541e36 (patch) | |
tree | dc1a3a884bb2fc10a89a3c46313897d22c5771eb /libkmid/fmout.cc | |
parent | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff) | |
download | tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip |
kdelibs update to Trinity v3.5.11
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkmid/fmout.cc')
-rw-r--r-- | libkmid/fmout.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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"); |