mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(incname): Decrement `len' only once per loop iteration.
This commit is contained in:
1 parent
c91f1d4a89
commit
ee47cc09f6
1 file changed
+1
-1
+1
-1
@@ -1361,7 +1361,7 @@ incname (char *name, size_t len)
|
||||
{
|
||||
while (len--)
|
||||
{
|
||||
char const *p = strchr (nameset, name[--len]);
|
||||
char const *p = strchr (nameset, name[len]);
|
||||
|
||||
/* If this character has a successor, use it. */
|
||||
if (p[1])
|
||||
|
||||
Reference in new issue
Block a user