Browse Source

Remove \r in readLine

Pascal Peridont 19 years ago
parent
commit
2bd278e612
1 changed files with 3 additions and 1 deletions
  1. 3 1
      std/neko/Socket.hx

+ 3 - 1
std/neko/Socket.hx

@@ -125,7 +125,9 @@ class Socket {
 	}
 
 	public function readLine() : String {
-		return readUntil( 10 );
+		var s = readUntil( 10 );
+		if( s.substr(-1,1) == "\r" ) return s.substr(0,-1);
+		return s;
 	}
 
 	public function setBlocking( b : Bool ) {