Upgrade to Text-Tabs+Wrap-2006.0711. Keep the local changes from
[p5sagit/p5-mst-13.2.git] / 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));