Commits

pajoye  committed 75e29a9

#33, dynamicGetbuf must return 0 for errors and EOF

  • Participants
  • Parent commits cc772fa

Comments (0)

Files changed (1)

File src/gd_io_dp.c

     {
       if (remain == 0)
 	{
-	  return EOF;
+	/* 2.0.34: EOF is incorrect. We use 0 for
+		 errors and EOF, just like fileGetbuf,
+		 which is a simple fread() wrapper. 
+		 TBB. Original bug report: Daniel Cowgill. */
+     return 0; /* NOT EOF */
 	}
       rlen = remain;
     }