Fix change #28533: my_strlcpy does not return the dest str!
authorSteve Hay <SteveHay@planit.com>
Tue, 11 Jul 2006 11:26:17 +0000 (11:26 +0000)
committerSteve Hay <SteveHay@planit.com>
Tue, 11 Jul 2006 11:26:17 +0000 (11:26 +0000)
p4raw-link: @28533 on //depot/perl: 6fca0082ec4f3b34a0dabc78331bad8c22489dd2

p4raw-id: //depot/perl@28545

util.c

diff --git a/util.c b/util.c
index 1bb7283..be619a3 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3054,7 +3054,8 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
                len = strlen(scriptname);
                if (len+MAX_EXT_LEN+1 >= sizeof(tmpbuf))
                    break;
-               cur = my_strlcpy(tmpbuf, scriptname, sizeof(tmpbuf));
+               my_strlcpy(tmpbuf, scriptname, sizeof(tmpbuf));
+               cur = tmpbuf;
            }
        } while (extidx >= 0 && ext[extidx]     /* try an extension? */
                 && my_strlcpy(tmpbuf+len, ext[extidx++], sizeof(tmpbuf) - len));