This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(patch) type fix in basic_istream::ignore


Mon Dec  6 11:44:24  1999  Mumit Khan  <khan@xraylith.wisc.edu>

	* bits/istream.tcc (basic_istream::ignore): streamsize is not 
	necessarily an `int'.

Index: bits/istream.tcc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/istream.tcc,v
retrieving revision 1.30
diff -u -3 -p -r1.30 istream.tcc
--- bits/istream.tcc	1999/12/06 09:29:58	1.30
+++ bits/istream.tcc	1999/12/06 17:45:17
@@ -678,7 +678,7 @@ namespace std {
 	    bool __testdelim = __c == __idelim;
 	    bool __testeof =  __c == __eof;
 	    		
-	    __n = min(__n, numeric_limits<int>::max());
+	    __n = min(__n, numeric_limits<streamsize>::max());
 	    while (_M_gcount < __n - 1 && !__testeof && !__testdelim)
 	      {
 		++_M_gcount;

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]