Skip to content

Commit bfc0566

Browse files
author
Rolf
committed
fix strmlcpy() for non-x86 architectures
1 parent ef8ab82 commit bfc0566

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

binutils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,11 @@ typedef long long llong;
412412
k = (int)strlen(src);
413413

414414
if (!m)
415-
n = m = k;
415+
n = k;
416416
else
417417
n = (k < m) ? k : m-1;
418418

419-
strlcpy(dst, src, m);
419+
strlcpy(dst, src, n+1);
420420
return n;
421421
}
422422

0 commit comments

Comments
 (0)