]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
-- changed $ to match before a trailing newline, even
authorFredrik Lundh <fredrik@pythonware.com>
Fri, 30 Jun 2000 21:40:20 +0000 (21:40 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Fri, 30 Jun 2000 21:40:20 +0000 (21:40 +0000)
   if the multiline flag isn't given.

Modules/_sre.c

index 268c5dd82b9ca34e16147f9a489248f2be777c50..46fe4ed67952db9f218a242db93236979eb2cef1 100644 (file)
@@ -310,7 +310,9 @@ SRE_AT(SRE_STATE* state, SRE_CHAR* ptr, SRE_CODE at)
                 SRE_IS_LINEBREAK((int) ptr[-1]));
 
        case SRE_AT_END:
-               return ((void*) ptr == state->end);
+        return (((void*) (ptr+1) == state->end &&
+                 SRE_IS_LINEBREAK((int) ptr[0])) ||
+                ((void*) ptr == state->end));
 
        case SRE_AT_END_LINE:
                return ((void*) ptr == state->end ||