From: Rebecca N. Palmer Date: Fri, 3 Apr 2015 13:18:04 +0000 (+0100) Subject: UIUC: fix check_float (EOF is not an error in this context) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=27a4be5d8730ed36695ceee0e873e4c300c3739b;p=flightgear.git UIUC: fix check_float (EOF is not an error in this context) http://sourceforge.net/p/flightgear/mailman/message/33683003/ --- diff --git a/src/FDM/UIUCModel/uiuc_menu_functions.cpp b/src/FDM/UIUCModel/uiuc_menu_functions.cpp index 5d520ca78..a1160495a 100644 --- a/src/FDM/UIUCModel/uiuc_menu_functions.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_functions.cpp @@ -72,7 +72,7 @@ bool check_float( const string &token) { float value; istringstream stream(token.c_str()); - return (stream >> value).good(); + return !((stream >> value).fail()); } void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D)