fix possible buffer overflow

compiler warning, very unlikely to hit in production
This commit is contained in:
mirabilos 2019-07-05 01:19:08 +02:00 committed by mirabilos
parent 7d0a9179b9
commit fc3f207327
No known key found for this signature in database
GPG key ID: 8950C1895EB8D3B3

View file

@ -347,12 +347,12 @@ void PlayPanel::updatePosLabel(int utick)
// this prevents jitter as width of time grows and shrinks
// alternative would be to use a monospaced font and a
// single label
char barBuffer[8];
char barBuffer[12];
sprintf(barBuffer, "%d", bar+1);// sprintf(barBuffer, "%03d", bar+1);
measureLabel->setText(QString(barBuffer));
char beatBuffer[8];
char beatBuffer[12];
sprintf(beatBuffer, "%02d", beat+1);
beatLabel->setText(QString(beatBuffer));
}