modules/demux/util/sub.c : compile fix
authorEric Petit <titer@videolan.org>
Sun, 24 Aug 2003 14:43:07 +0000 (14:43 +0000)
committerEric Petit <titer@videolan.org>
Sun, 24 Aug 2003 14:43:07 +0000 (14:43 +0000)
modules/demux/util/sub.c

index 340034b..f3175c6 100644 (file)
@@ -2,7 +2,7 @@
  * sub.c
  *****************************************************************************
  * Copyright (C) 1999-2003 VideoLAN
- * $Id: sub.c,v 1.23 2003/08/24 00:36:38 fenrir Exp $
+ * $Id: sub.c,v 1.24 2003/08/24 14:43:07 titer Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -311,9 +311,10 @@ char* sub_detect( subtitle_demux_t *p_sub, char *psz_filename)
                         msg_Dbg( p_sub, "autodetected subtitlefile: %s", strdup( p_dir_afile->d_name ) );
                         if( psz_dir )
                         {
+                            char *psz_append;
                             psz_result = (char*)malloc( i_dirlen + strlen( p_dir_afile->d_name ) +1 );
                             strncpy( psz_result, psz_dir, i_dirlen );
-                            char *psz_append = psz_result + i_dirlen;
+                            psz_append = psz_result + i_dirlen;
                             strncpy( psz_append, p_dir_afile->d_name, strlen( p_dir_afile->d_name ) );
                             psz_result[i_dirlen + strlen( p_dir_afile->d_name )] = '\0';
                             return psz_result;