Changeset 0a7905f66c05cd0ae4c34cf2c1a27371213dc110

Show
Ignore:
Timestamp:
04/14/08 18:32:53 (5 months ago)
Author:
Jérôme Decoodt <djc+git@videolan.org>
git-committer:
Jérôme Decoodt <djc+git@videolan.org> 1208190773 +0200
git-parent:

[3b420ec94e74840c9e9a22f1a73a442c24d3d0b2]

git-author:
Jérôme Decoodt <djc+git@videolan.org> 1208190773 +0200
Message:

Fix parsing of plugin-path with escaping chars...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/modules.c

    r0311983 r0a7905f  
    864864{ 
    865865    char * path; 
    866     int i
     866    int i, done
    867867    bool escaped = false; 
    868868 
     
    874874 
    875875    /* Look for PATH_SEP_CHAR (a ':' or a ';') */ 
    876     for( i = 0; paths[i]; i++ ) { 
     876    for( i = 0, done = 0 ; paths[i]; i++ ) { 
    877877        /* Take care of \\ and \: or \; escapement */ 
    878878        if( escaped ) { 
    879879            escaped = false; 
    880             path[i] = paths[i]; 
     880            path[done++] = paths[i]; 
    881881        } 
    882882        else if( paths[i] == '\\' ) 
     
    885885            break; 
    886886        else 
    887             path[i] = paths[i]; 
    888     } 
    889     path[i] = 0; 
     887            path[done++] = paths[i]; 
     888    } 
     889    path[done++] = 0; 
    890890 
    891891    /* Return the remaining paths */