From ef34bd2c0d00d2ef23bcffaf21b169342729a26b Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Fri, 30 Jun 2000 21:40:20 +0000 Subject: [PATCH] -- changed $ to match before a trailing newline, even if the multiline flag isn't given. --- Modules/_sre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/_sre.c b/Modules/_sre.c index 268c5dd82b9..46fe4ed6795 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -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 ||