This website works better with JavaScript.
Home
Explore
Help
Sign In
jrhoffa
/
nese
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Fix null terminator in getline()
master
Nathaniel Walizer
10 months ago
parent
58ee59d297
commit
719f51aa12
1 changed files
with
1 additions
and
1 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
src/compat.c
+ 1
- 1
src/compat.c
View File
@@ -45,7 +45,7 @@ ssize_t getline(char **restrict lineptr, size_t *restrict n,
if ('\n' == chr) break;
if ('\n' == chr) break;
}
}
ptr
[len]
= '\0';
*
ptr = '\0';
return (len == 0 ? -1 : len);
return (len == 0 ? -1 : len);
}
}
Write
Preview
Loading…
Cancel
Save