Selaa lähdekoodia

Remove \r in readLine

Pascal Peridont 19 vuotta sitten
vanhempi
commit
2bd278e612
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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 ) {