PennMUSH Community

Ticket #7436 (new bug)

Opened 1 year ago

Last modified 1 year ago

ANSI bug in matching

Reported by: Talvo Assigned to: raevnos
Priority: major Milestone:
Keywords: Cc:
Visibility: Public

Description

Trinsec mentioned a bug in ANSI with grab(), where it has to do a (non-wildcard) match across different colours, like:

think grab(ansi(r,t)[ansi(b,est)],*te*)

The problem seems to be that quick_wild is given arguments containing ANSI escape codes, and they aren't being stripped before the comparison is done. Just changing quick_wild so that it remove_markup()s the args it passes on to check_literal/quick_wild_new fixes the problem (the grab(), etc, match correctly).

I haven't submitted a patch, though, because it seems rather inefficient - in graball(), for instance, I believe the wildcard pattern is passed to quick_match once for every list element, so it would seem to be better for it (graball) to remove_markup the pattern once, and just call quick_match with the (markupless) string.

Change History

08/24/07 01:05:59 changed by raevnos

  • owner set to raevnos.

match(), matchall(), graball() and probably others have the same issue.

Working on your suggested fix. Should this be done for 1.8.2 or just 1.8.3?