ref: fd80dde429cf35fffa8662c7933a7df36240ab79
parent: 81cbff917f965bf7fab35cb42d68ebf14a880aa5
author: cinap_lenrek <[email protected]>
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);
}
}