Ignore:
Timestamp:
Sep 6, 2016, 5:21:04 AM (9 years ago)
Author:
bird
Message:

fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kHlp/Generic/kHlpGetFilename.c

    r29 r85  
    55
    66/*
    7  * Copyright (c) 2006-2007 Knut St. Osmundsen <bird-kStuff-spamix@anduin.net>
     7 * Copyright (c) 2006-2016 Knut St. Osmundsen <bird-kStuff-spamix@anduin.net>
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    4545KHLP_DECL(char *) kHlpGetFilename(const char *pszFilename)
    4646{
    47     const char *pszLast = NULL;
     47    const char *pszLast = pszFilename;
    4848    for (;;)
    4949    {
     
    6464        }
    6565#endif
    66         if (!ch)
    67             return (char *)(pszLast ? pszLast : pszFilename);
    68         pszFilename++;
     66        if (ch)
     67            pszFilename++;
     68        else
     69            return (char *)pszLast;
    6970    }
    7071}
Note: See TracChangeset for help on using the changeset viewer.