File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
libvisual-plugins/plugins/actor/dancingparticles Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ void loadepic2(const char *file)
6262 }
6363 numCenters2 = 0 ;
6464 totLength=0 ;
65- fgets (buf, 255 ,f);
66- while (! feof ( f))
65+
66+ while (fgets (buf, sizeof (buf), f))
6767 {
6868
6969 if (buf[0 ]==' \\ ' )
@@ -85,7 +85,6 @@ void loadepic2(const char *file)
8585
8686
8787 }
88- fgets (buf,255 ,f);
8988 }
9089 fclose (f);
9190 if (!numCenters2)
Original file line number Diff line number Diff line change @@ -105,9 +105,7 @@ int load_parameters(const char * filename)
105105 freeparams ();
106106 p_parsed.name = 0 ;
107107
108- fgets (buf,1024 , f);
109-
110- while (!feof (f))
108+ while (fgets (buf,sizeof (buf),f))
111109 {
112110 ptr = buf;
113111 word = nextword (ptr);
@@ -209,7 +207,6 @@ int load_parameters(const char * filename)
209207 }
210208 }
211209 }
212- fgets (buf,1024 , f);
213210 }
214211 if (mode == 1 )
215212 {
You can’t perform that action at this time.
0 commit comments