hjfs: preserve newlines in commit message (thanks BurnZeZ)

This commit is contained in:
cinap_lenrek 2015-04-22 19:54:13 +02:00
parent 81cbff917f
commit fd80dde429

View file

@ -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);
}
}