=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sed/compile.c,v retrieving revision 1.47 retrieving revision 1.48 diff -c -r1.47 -r1.48 *** src/usr.bin/sed/compile.c 2017/12/13 16:07:54 1.47 --- src/usr.bin/sed/compile.c 2018/07/09 09:43:54 1.48 *************** *** 1,4 **** ! /* $OpenBSD: compile.c,v 1.47 2017/12/13 16:07:54 millert Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. --- 1,4 ---- ! /* $OpenBSD: compile.c,v 1.48 2018/07/09 09:43:54 schwarze Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. *************** *** 367,376 **** if ((d = compile_ccl(&p, d)) == NULL) error(COMPILE, "unbalanced brackets ([])"); continue; - } else if (*p == '\\' && p[1] == '[') { - *d++ = *p++; } else if (*p == '\\' && p[1] == c) { p++; } else if (*p == '\\' && p[1] == 'n') { *d++ = '\n'; p += 2; --- 367,376 ---- if ((d = compile_ccl(&p, d)) == NULL) error(COMPILE, "unbalanced brackets ([])"); continue; } else if (*p == '\\' && p[1] == c) { p++; + } else if (*p == '\\' && p[1] == '[') { + *d++ = *p++; } else if (*p == '\\' && p[1] == 'n') { *d++ = '\n'; p += 2;