blob: 164c205c4b98b3d3844c04aa2c9c231215339808 (
plain) (
tree)
|
|
--- gps-1.004/src/db.cpp.orig 2005-03-02 22:12:17.000000000 +0100
+++ gps-1.004/src/db.cpp 2006-11-21 19:52:18.000000000 +0100
@@ -413,7 +413,7 @@
if(host.size() == 0) // not resolved
return string(host);
string::size_type pos = host.find('.');
- if(pos == string::npos) // no dot in name
+ if(pos == host.rfind('.')) // less than two dots in name
return string(host);
if(WEAKRVHOSTDBG) cout << host.substr(pos) << " pos:" << pos << endl;
if(WEAKRVHOSTDBG) cout << host.substr(pos+1,string::npos) << endl;
|