libwine: Avoid memrchr.

This commit is contained in:
Alexandre Julliard 2012-06-06 12:39:33 +02:00
parent 624ad399f1
commit cbdc795515
1 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,8 @@ static char *get_runtime_bindir( const char *argv0 )
if ((ret = readlink( EXE_LINK, bindir, size )) == -1) break; if ((ret = readlink( EXE_LINK, bindir, size )) == -1) break;
if (ret != size) if (ret != size)
{ {
if (!(p = memrchr( bindir, '/', ret ))) break; bindir[ret] = 0;
if (!(p = strrchr( bindir, '/' ))) break;
if (p == bindir) p++; if (p == bindir) p++;
*p = 0; *p = 0;
return bindir; return bindir;