summaryrefslogtreecommitdiffstats
path: root/src/replaygainfilelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/replaygainfilelist.cpp')
-rw-r--r--src/replaygainfilelist.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/replaygainfilelist.cpp b/src/replaygainfilelist.cpp
index 91852a2..7f97f67 100644
--- a/src/replaygainfilelist.cpp
+++ b/src/replaygainfilelist.cpp
@@ -1156,7 +1156,7 @@ void ReplayGainFileList::processOutput( TDEProcess* proc, char* data, int )
if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) {
outputPattern.replace( "%p", "%i" );
//outputPattern.replace( "%a", "%i" ); // for compatibility with old plugins
- sscanf( data, outputPattern, &iPercent );
+ sscanf( data, outputPattern.local8Bit().data(), &iPercent );
}
/*else if( outputPattern.find("%t") != -1 ) { // NOTE a little bit complicated and not necessary
outputPattern.replace( "%t", "%i" );
@@ -1167,12 +1167,12 @@ void ReplayGainFileList::processOutput( TDEProcess* proc, char* data, int )
if( outputPattern.find("%0") < outputPattern.find("%1") ) {
outputPattern.replace( "%0", "%i" );
outputPattern.replace( "%1", "%i" );
- sscanf( data, outputPattern, &iPos, &iNum );
+ sscanf( data, outputPattern.local8Bit().data(), &iPos, &iNum );
}
else {
outputPattern.replace( "%0", "%i" );
outputPattern.replace( "%1", "%i" );
- sscanf( data, outputPattern, &iNum, &iPos );
+ sscanf( data, outputPattern.local8Bit().data(), &iNum, &iPos );
}
if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum;
}
@@ -1260,3 +1260,4 @@ void ReplayGainFileList::update()
emit updateProgress( int(processedTime) + percent * int(timeCount) / 100, int(time) );
}
+#include "replaygainfilelist.moc"