Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision db19e1d0d4adcc296ca7022c295f441155d4b6dc)
+++ libcfa/src/iostream.cfa	(revision 82a5ea23df09d8e6900e45f3b0d081bad576c253)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug 17 12:31:47 2024
-// Update Count     : 2038
+// Last Modified On : Wed Sep  4 11:30:12 2024
+// Update Count     : 2040
 //
 
@@ -512,5 +512,5 @@
 		if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk
 		// printf( "R val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n",
-		// 		f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 
+		// 		f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 );
 		(ostype &)(os | f);
 		if ( cnt == 1 ) {
@@ -554,5 +554,5 @@
 		if ( f.flags.neg ) f.val = -f.val;
 		// printf( "L val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n",
-		// 		f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 
+		// 		f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 );
 		(ostype &)(os | f);
 
@@ -597,5 +597,5 @@
 	"y", "z", "a", "f", "p", "n", "u", "m", "",
 	"K", "M", "G", "T", "P", "E", "Z", "Y"
-}; 
+};
 #define SUFFIXES_START (-24) /* Smallest power for which there is a suffix defined. */
 #define SUFFIXES_END (SUFFIXES_START + (int)((sizeof(suffixes) / sizeof(char *) - 1) * 3))
@@ -1064,4 +1064,8 @@
 			else args = fmt( is, fmtstr, s, &len );
 			// fprintf( stderr, "cstr %s %d %d %d\n", fmtstr, args, len, f.cstr.wd );
+
+			// No data read and eof is on => true eof so raise exception.
+			if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file );
+
 			if ( check && len >= rwd && ! eof( is ) ) {	// might not fit
 				char peek;
@@ -1087,4 +1091,7 @@
 				else args = fmt( is, fmtstr, s, &len );
 
+				// No data read and eof is on => true eof so raise exception.
+				if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file );
+
 				if ( check && len == rwd && ! eof( is ) ) {	// might not fit
 					char peek;
@@ -1106,4 +1113,8 @@
 				else args = fmt( is, fmtstr, s, &len );
 				// fprintf( stderr, "incl/excl %s \"%s\" %d %d %d %d %d %c\n", fmtstr, s, args, wd, len, eof( is ), check, s[wd] );
+
+				// No data read and eof is on => true eof so raise exception.
+				if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file );
+
 				if ( check && len == rwd && ! eof( is ) ) {	// might not fit
 					// fprintf( stderr, "overflow\n" );
