Skip to content

Commit

Permalink
Fix DrumSynth sscanf (#4869)
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX authored and zonkmachine committed Mar 3, 2019
1 parent a233291 commit 05d5e20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/DrumSynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ void DrumSynth::GetEnv(int env, const char *sec, const char *key, QString ini)
char en[256], s[8];
int i=0, o=0, ep=0;
GetPrivateProfileString(sec, key, "0,0 100,0", en, sizeof(en), ini);
en[255]=0; //be safe!

//be safe!
en[255]=0;
s[0]=0;

while(en[i]!=0)
{
Expand Down

0 comments on commit 05d5e20

Please sign in to comment.