[MPlayer-cvslog] CVS: main/Gui/skin skin.c,1.26,1.27
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Mon May 23 22:12:49 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/Gui/skin
In directory mail:/var2/tmp/cvs-serv6066/Gui/skin
Modified Files:
skin.c
Log Message:
Print error when skin file is not readable (e.g. a directory) instead of hanging
Index: skin.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/skin/skin.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- skin.c 15 Dec 2004 01:22:24 -0000 1.26
+++ skin.c 23 May 2005 20:12:47 -0000 1.27
@@ -688,7 +688,11 @@
linenumber=0;
while ( !feof( skinFile ) )
{
- fgets( tmp,255,skinFile ); linenumber++;
+ if (!fgets( tmp,255,skinFile )) {
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SkinFileNotReadable, fn);
+ return -1;
+ }
+ linenumber++;
c=tmp[ strlen( tmp ) - 1 ]; if ( c == '\n' || c == '\r' ) tmp[ strlen( tmp ) - 1 ]=0;
c=tmp[ strlen( tmp ) - 1 ]; if ( c == '\n' || c == '\r' ) tmp[ strlen( tmp ) - 1 ]=0;
More information about the MPlayer-cvslog
mailing list