song: report proper position of invalid character in a format

This commit is contained in:
Andrzej Rybczak
2010-08-24 16:14:42 +02:00
parent 7d3a817de0
commit 30ab7814f4

View File

@@ -515,7 +515,7 @@ bool MPD::Song::isFormatOk(const std::string &type, const std::string &s)
while (isdigit(s[++i])) { }
if (!toGetFunction(s[i]))
{
std::cerr << type << ": invalid character at position " << IntoStr(s[i]) << ": '" << s[i] << "'\n";
std::cerr << type << ": invalid character at position " << IntoStr(i+1) << ": '" << s[i] << "'\n";
return false;
}
}