Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
GH-168: don't crash for putty.cfg with missing trailing line
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed Nov 9, 2014
1 parent 294bbdb commit c9e91b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion windows/winstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ int loadPath() {
}
else {
/* JK: parse conf file to path variables */
*(fileCont+fileSize) = '\0';
*(fileCont+fileSize) = '\n'; // ensure there's a newline at the end for strchr().
*(fileCont+fileSize+1) = '\0';
p = fileCont;
while (p) {
if (*p == ';') { /* JK: comment -> skip line */
Expand Down

0 comments on commit c9e91b8

Please sign in to comment.