Mercurial > hg > svcore
comparison data/fft/FFTDataServer.cpp @ 986:e8e6c4e7437b
Correct some really stupid fixed-length string stuff, including a genuine stack overflow that causes a crash on OS/X for certain colour 3d plot data.
author | Chris Cannam |
---|---|
date | Mon, 29 Sep 2014 13:27:13 +0100 |
parents | 59e7fe1b1003 |
children | cc27f35aa75c |
comparison
equal
deleted
inserted
replaced
985:f073d924a7c3 | 986:e8e6c4e7437b |
---|---|
1426 int windowSize, | 1426 int windowSize, |
1427 int windowIncrement, | 1427 int windowIncrement, |
1428 int fftSize, | 1428 int fftSize, |
1429 bool polar) | 1429 bool polar) |
1430 { | 1430 { |
1431 char buffer[200]; | 1431 return QString("%1-%2-%3-%4-%5-%6%7") |
1432 | 1432 .arg(XmlExportable::getObjectExportId(model)) |
1433 sprintf(buffer, "%u-%u-%u-%u-%u-%u%s", | 1433 .arg(channel + 1) |
1434 (unsigned int)XmlExportable::getObjectExportId(model), | 1434 .arg((int)windowType) |
1435 (unsigned int)(channel + 1), | 1435 .arg(windowSize) |
1436 (unsigned int)windowType, | 1436 .arg(windowIncrement) |
1437 (unsigned int)windowSize, | 1437 .arg(fftSize) |
1438 (unsigned int)windowIncrement, | 1438 .arg(polar ? "-p" : "-r"); |
1439 (unsigned int)fftSize, | |
1440 polar ? "-p" : "-r"); | |
1441 | |
1442 return buffer; | |
1443 } | 1439 } |
1444 | 1440 |
1445 void | 1441 void |
1446 FFTDataServer::FillThread::run() | 1442 FFTDataServer::FillThread::run() |
1447 { | 1443 { |