ref: 43b8720ed74d56713b1a4d69b3dd59236269d86c
parent: f6b5b77717efae1c33c2f8dbbd5369bebcd7d36a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Apr 22 15:54:13 EDT 2015
hjfs: preserve newlines in commit message (thanks BurnZeZ)
--- a/sys/src/cmd/hgfs/info.c
+++ b/sys/src/cmd/hgfs/info.c
@@ -60,7 +60,8 @@
}
} else {n = ri->why ? strlen(ri->why) : 0;
- ri->why = realloc(ri->why, n + strlen(buf)+1);
+ ri->why = realloc(ri->why, n + strlen(buf)+2);
+ if(n > 0) ri->why[n++] = '\n';
strcpy(ri->why + n, buf);
}
}
--
⑨