commit dcbb57c7ad077d02d640f7c5420439187e920548
parent 628c82275fa57908ed2c998a5831e9f97490f231
Author: Olivier Jolly <[email protected]>
Date: Fri, 20 Nov 2015 23:35:45 +0100
simplified bank filename creation
Diffstat:
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/Misc/Bank.cpp b/src/Misc/Bank.cpp
@@ -170,15 +170,10 @@ int Bank::savetoslot(unsigned int ninstrument, Part *part)
snprintf(tmpfilename,
maxfilename,
- "%4d-%s",
+ "%04d-%s",
ninstrument + 1,
(char *)part->Pname);
- //add the zeroes at the start of filename
- for(int i = 0; i < 4; ++i)
- if(tmpfilename[i] == ' ')
- tmpfilename[i] = '0';
-
string filename = dirname + '/' + legalizeFilename(tmpfilename) + ".xiz";
FILE *f = fopen(filename.c_str(), "r");