https://bugs.openldap.org/show_bug.cgi?id=8255
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- followed with:
AFAICT the else statement with the debug statement is hit because the "RESULT\n" line is not really consumed before the while loop (line 1671) and that results in this wrong output. s is still at the beginning of "RESULT\n" line when entering the while loop.