• Colomban Wendling's avatar
    Fix crash with bulk pattern replacements (introduced with c83a93eb) · 5412a244
    Colomban Wendling yazdı
    "regex_match_text" and "regex_matches" being globals, performing
    several searches and then the replacements separately lead to them
    having unexpected values, resulting in incorrect behavior and crash.
    
    Fix this by removing the globals and instead make the search functions
    return match details.  Not only this fixes the issue, but also make the
    code a lot more maintainable by not having globals introducing side
    effects (proof of them being an issue is that c83a93eb inadvertently
    broke things bad).
    5412a244
search.h 3.6 KB