mirror of https://github.com/aria2/aria2
Fixed compile error with mingw
parent
b89bc8a6cb
commit
82e5318e35
|
@ -182,10 +182,10 @@ void option_processing(Option& op, std::vector<std::string>& uris,
|
||||||
// finaly let's parse and store command-iine options.
|
// finaly let's parse and store command-iine options.
|
||||||
oparser->parse(op, cmdstream);
|
oparser->parse(op, cmdstream);
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
for(std::map<std::string, std::string>::iterator i = op.begin();
|
for(size_t i = 1, len = option::countOption(); i < len; ++i) {
|
||||||
i != op.end(); ++i) {
|
const Pref* pref = option::i2p(i);
|
||||||
if(!util::isUtf8((*i).second)) {
|
if(op.defined(pref) && !util::isUtf8(op.get(pref))) {
|
||||||
(*i).second = nativeToUtf8((*i).second);
|
op.put(pref, nativeToUtf8(op.get(pref)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
|
|
Loading…
Reference in New Issue