diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-22 19:54:13 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-22 19:54:13 +0200 |
commit | fd80dde429cf35fffa8662c7933a7df36240ab79 (patch) | |
tree | 26dd7683173a58e0cc0ad5ad147e84e52a54e3af /sys/src/cmd/hgfs | |
parent | 81cbff917f965bf7fab35cb42d68ebf14a880aa5 (diff) |
hjfs: preserve newlines in commit message (thanks BurnZeZ)
Diffstat (limited to 'sys/src/cmd/hgfs')
-rw-r--r-- | sys/src/cmd/hgfs/info.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/hgfs/info.c b/sys/src/cmd/hgfs/info.c index 45877f957..0ea7d5ed1 100644 --- a/sys/src/cmd/hgfs/info.c +++ b/sys/src/cmd/hgfs/info.c @@ -60,7 +60,8 @@ loadrevinfo(Revlog *changelog, int rev) } } 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); } } |