ZynAddSubFX: fixed possible accesses beyond array boundaries

GCC issued a few warnings concerning array out-of-boundary accesses.
This commit fixes them.
This commit is contained in:
Tobias Doerffel
2009-04-18 00:59:40 +02:00
parent 5828643582
commit 827cbadc54
2 changed files with 2 additions and 2 deletions

View File

@@ -293,7 +293,7 @@ int Bank::newbank(const char *newbankdirname){
if (((bankdir[strlen(bankdir)-1])!='/')&&((bankdir[strlen(bankdir)-1])!='\\')){
strncat(bankdir,"/",MAX_STRING_SIZE);
};
strncat(bankdir,newbankdirname,MAX_STRING_SIZE);
strncat(bankdir,newbankdirname,MAX_STRING_SIZE-1);
#ifdef OS_WINDOWS
result=mkdir(bankdir);
#else

View File

@@ -138,7 +138,7 @@ class Part{
EffectMgr *partefx[NUM_PART_EFX];//insertion part effects (they are part of the instrument)
unsigned char Pefxroute[NUM_PART_EFX];//how the effect's output is routed(to next effect/to out)
bool Pefxbypass[NUM_PART_EFX];//if the effects are bypassed
bool Pefxbypass[NUM_PART_EFX+1];//if the effects are bypassed
pthread_mutex_t *mutex;