Skip to content

Commit

Permalink
Fixed bug in the autoeq importer
Browse files Browse the repository at this point in the history
+ MSVC compatibility
  • Loading branch information
ThePBone committed Sep 29, 2019
1 parent a41fd52 commit b25dc46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,10 @@ void MainWindow::exportVDC()
}
void MainWindow::importParametricAutoEQ(){

ui->listView_DDCPoints->clear();

QString fileName = QFileDialog::getOpenFileName(this,
"Import AutoEQ config 'ParametricEQ.txt'", "", "AutoEQ ParametricEQ.txt (*ParametricEQ.txt);;All files (*.*)");
if (fileName != "" && fileName != nullptr){
ui->listView_DDCPoints->clear();
QString str;
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)){
Expand Down
2 changes: 1 addition & 1 deletion vdcimporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ int vasprintf(char **strp, const char *fmt, va_list ap)
{
int len = _vscprintf_so(fmt, ap);
if (len == -1) return -1;
char *str = malloc((size_t)len + 1);
char *str = (char*)malloc((size_t)len + 1);
if (!str) return -1;
int r = vsnprintf(str, len + 1, fmt, ap); /* "secure" version of vsprintf */
if (r == -1) return free(str), -1;
Expand Down

0 comments on commit b25dc46

Please sign in to comment.