]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a misuse of a return value that lead to an error message being displayed
authorcurt <curt>
Tue, 14 Jun 2005 17:53:40 +0000 (17:53 +0000)
committercurt <curt>
Tue, 14 Jun 2005 17:53:40 +0000 (17:53 +0000)
when one shouldn't have been.

src/FDM/ExternalPipe/ExternalPipe.cxx

index a94525448ac30bec378035050ab5d4a6df25671b..422023ed15ffbfbfd7aaa07fd8651e8f26cfb51b 100644 (file)
@@ -411,9 +411,9 @@ void FGExternalPipe::update_binary( double dt ) {
     length = sizeof(fdm);
     cout << "about to read fdm data from remote fdm." << endl;
     result = fread( (char *)(& fdm), length, 1, pd2 );
-    if ( result != length ) {
+    if ( result != 1 ) {
         SG_LOG( SG_IO, SG_ALERT, "Read error from named pipe: "
-                << fifo_name_2 );
+                << fifo_name_2 << " expected 1 item, but got " << result );
     } else {
         cout << "  read successful." << endl;
     }