diff options
-rw-r--r-- | user/tlecarrour/porting_guide_for_dummies.mdwn | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/user/tlecarrour/porting_guide_for_dummies.mdwn b/user/tlecarrour/porting_guide_for_dummies.mdwn index f43119bd..772be2bb 100644 --- a/user/tlecarrour/porting_guide_for_dummies.mdwn +++ b/user/tlecarrour/porting_guide_for_dummies.mdwn @@ -199,7 +199,7 @@ Call readlink(), check return value and set the null char in the linkname: len = readlink(filename, linkname, sb.st_size + 1); if (len < 0 || len > sb.st_size) { ... - linkname[sb.st_size] = '\0'; + linkname[len] = '\0'; ### Alternative use of readlink(): readlink_malloc() |