From 2d337dab7f6d32f8a0ddd035dd904b3f51909afb Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sun, 27 Jul 2008 20:36:45 +0000 Subject: FS#9221 by Christopher Williams fixing a couple of bugs in keybox git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18138 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/guspat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'apps/plugins/midi/guspat.c') diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 419cfa3ad0..1b310d2de8 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -162,10 +162,12 @@ struct GPatch * gusload(char * filename) int file = rb->open(filename, O_RDONLY); + DEBUGF("filename: %s\n", filename); + if(file == -1) { - char message[50]; - rb->snprintf(message, 50, "Error opening %s", filename); + char message[MAX_PATH]; + rb->snprintf(message, MAX_PATH, "Error opening %s", filename); rb->splash(HZ*2, message); return NULL; } @@ -197,12 +199,12 @@ struct GPatch * gusload(char * filename) /* printf("\nFILE: %s", filename); */ /* printf("\nlayerSamples=%d", gp->numWaves); */ - +DEBUGF("hej\n"); int a=0; for(a=0; anumWaves; a++) gp->waveforms[a] = loadWaveform(file); - +DEBUGF("hej2\n"); /* printf("\nPrecomputing note table"); */ for(a=0; a<128; a++) @@ -210,7 +212,7 @@ struct GPatch * gusload(char * filename) gp->noteTable[a] = selectWaveform(gp, a); } rb->close(file); - +DEBUGF("hej3\n"); return gp; } -- cgit v1.2.3