]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/libregexp/rregexec.c
libregex: fix sed regression (thans spew)
[plan9front.git] / sys / src / libregexp / rregexec.c
index 557580b9c58f2d72b1a1be7fdfa885fc6fb450c8..b1320de4bfe50dd16b154066c64efc3404cb937e 100644 (file)
@@ -68,7 +68,6 @@ Again:
                        if(*rsp != curinst->r)
                                goto Done;
                case OANY: /* fallthrough */
-               Any:
                        next = t->next;
                        t->pc = curinst + 1;
                        t->next = nil;
@@ -110,12 +109,10 @@ Again:
                        }
                        goto Done;
                case OEOL:
-                       if(*rsp == L'\0' && rep == nil) {
+                       if(*rsp == '\n' || *rsp == L'\0' && rep == nil) {
                                curinst++;
                                goto Again;
                        }
-                       if(*rsp == '\n')
-                               goto Any;
                        goto Done;
                case OJMP:
                        curinst = curinst->a;