=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/pch.c,v retrieving revision 1.42 retrieving revision 1.43 diff -c -r1.42 -r1.43 *** src/usr.bin/patch/pch.c 2014/11/17 10:58:09 1.42 --- src/usr.bin/patch/pch.c 2014/11/18 17:03:35 1.43 *************** *** 1,4 **** ! /* $OpenBSD: pch.c,v 1.42 2014/11/17 10:58:09 tobias Exp $ */ /* * patch - a program to apply diffs to original files --- 1,4 ---- ! /* $OpenBSD: pch.c,v 1.43 2014/11/18 17:03:35 tobias Exp $ */ /* * patch - a program to apply diffs to original files *************** *** 344,352 **** ok_to_create_file = true; /* * If this is a new context diff the character just ! * before the newline is a '*'. */ ! while (*s != '\n') s++; p_indent = indent; p_start = previous_line; --- 344,352 ---- ok_to_create_file = true; /* * If this is a new context diff the character just ! * at the end of the line is a '*'. */ ! while (*s && *s != '\n') s++; p_indent = indent; p_start = previous_line;