-- changed $ to match before a trailing newline, even

if the multiline flag isn't given.
This commit is contained in:
Fredrik Lundh 2000-06-30 21:40:20 +00:00
parent 47674029e1
commit ef34bd2c0d
1 changed files with 3 additions and 1 deletions

View 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 ||