netdb - NextWord
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
Hello!
I am find bug in units/netdb/netdb.pp [FreeBSD, fpc 1.0.10]
Function NextWord(Var Line : String) : String;
String:
"Result:=Copy(Line,I,J-1);"
is wrong. The variable I is index of first char, J
- index of last char WORD's. So correct:
"Result:=Copy(Line,I,J-I);"
--
Easy test:
FreeBSD 4.9 Release #1, example netdb/testsvc.pp , after change main block:
begin
testport(80,'tcp');
end.
STDOUT: "No entry for port 80"
8-() !
After patch netdb.pp:
Name : http
Protocol : tcp
Port : 80
Aliases : www,www-http
Ok :)
Additional information:
Reporter: Vladimir
EMail: deka at web dot ssmu dot ru
Mantis conversion info:
- Mantis ID: 4953
- Version: 1.0.10
- Fixed in version: 1.9.3