song: report proper position of invalid character in a format

master
Andrzej Rybczak 16 years ago
parent 7d3a817de0
commit 30ab7814f4
  1. 2
      src/song.cpp

@ -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;
}
}

Loading…
Cancel
Save