off by one? maybe

This commit is contained in:
Andrew Pamment 2017-09-10 22:35:08 +10:00
parent 00ba41f13d
commit 5b8769ad29

View File

@ -992,7 +992,7 @@ int main(int argc, char **argv)
if (unwrapped_quote[i] == '\r' || unwrapped_quote[i] == ' ' || i - last_space > 71) { if (unwrapped_quote[i] == '\r' || unwrapped_quote[i] == ' ' || i - last_space > 71) {
quote_lines[quote_line_count] = (char *)malloc(i - start_line + 1); quote_lines[quote_line_count] = (char *)malloc(i - start_line + 1);
memset(buffer, 0, 256); memset(buffer, 0, 256);
strncpy(buffer, &unwrapped_quote[start_line], 73); strncpy(buffer, &unwrapped_quote[start_line], 74);
sprintf(quote_lines[quote_line_count], " %c> %s", msgto[0], buffer); sprintf(quote_lines[quote_line_count], " %c> %s", msgto[0], buffer);
j = 0; j = 0;
start_line = i+1; start_line = i+1;