mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-15 19:03:54 +01:00
Bash-4.3 distribution sources and documentation
This commit is contained in:
1 parent
4539d736f1
commit
ac50fbac37
497 files changed
+129394
-87597
No files matched your search
+2
-2
@@ -133,7 +133,7 @@ substring (string, start, end)
|
||||
|
||||
len = end - start;
|
||||
result = (char *)xmalloc (len + 1);
|
||||
strncpy (result, string + start, len);
|
||||
memcpy (result, string + start, len);
|
||||
result[len] = '\0';
|
||||
return (result);
|
||||
}
|
||||
@@ -158,7 +158,7 @@ strsub (string, pat, rep, global)
|
||||
if (replen)
|
||||
RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2));
|
||||
|
||||
for (r = rep; *r; )
|
||||
for (r = rep; *r; ) /* can rep == "" */
|
||||
temp[templen++] = *r++;
|
||||
|
||||
i += patlen ? patlen : 1; /* avoid infinite recursion */
|
||||
|
||||
Reference in new issue
Block a user