grit mini-fix

Small fix for grit. The function that handles the extensions didn't add the extension-period as it should if no extension was given in the -o option. ‘-ofoo’ would result in things like foos and foosh.

This is a one-line fix, by the way. In /libgrit/pathfun.cpp, function path_repl_ext(), replace this:

    if(pext)
        strcpy(pext, ext);			
    else
        strcat(str, ext);
by this
    if(pext)
        strcpy(pext, ext);			
    else
    {
        strcat(str, ".");
        strcat(str, ext);
    }

This is not really a critical update. As long as there's an extension-period inside the -o option, or if there was no -o to start with, it should work fine as is.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>