Use String::ToString() in CompatComponent::ProcessCommand().

This commit is contained in:
Gunnar Beutner 2013-01-21 13:45:27 +01:00
parent 9c74bfd5be
commit ccbb98e64a
1 changed files with 8 additions and 1 deletions

View File

@ -155,7 +155,14 @@ void CompatComponent::ProcessCommand(const String& command)
String timestamp = command.SubStr(1, pos - 1); String timestamp = command.SubStr(1, pos - 1);
String args = command.SubStr(pos + 2, String::NPos); String args = command.SubStr(pos + 2, String::NPos);
double ts = strtod(timestamp.CStr(), NULL); double ts = timestamp.ToDouble();
if (ts == 0) {
Logger::Write(LogWarning, "compat", "Invalid timestamp in command: " + command);
return;
}
vector<String> argv = args.Split(is_any_of(";")); vector<String> argv = args.Split(is_any_of(";"));
if (argv.size() == 0) { if (argv.size() == 0) {