Thread (28 messages) 28 messages, 2 authors, 2016-06-15

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

flat view

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:55:51

Brandon Casey wrote:
On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder [off-list ref] wrote:
quoted
First (snipped), it seeks back two newlines from the end and then
forward to the next non-newline character, so (buf + i) is at the
start of the last line of (the interesting part of) sb.
Did you catch that the two newlines have to be adjacent to each other?
[...]

Here is the loop in master:

	int hit = 0;
[...]

	for (i = len - 1; i > 0; i--) {
		if (hit && buf[i] == '\n')
			break;
		hit = (buf[i] == '\n');
	}

I don't see any adjacency check.  I agree with you that "two adjacent
newlines" was probably the intent, though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help