Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

[BUG] More groups, than it's in RegEx cause game crash. #14

@ghost

Description

Describe the bug
If replace string contains more groups, than it's in RegEx, then it leads to game crash.

Minecraft Info
Minecraft information:

  • Minecraft version: 1.18.2;
  • AdvancedChatCore 1.5.0;
  • AdvancedChatFilters 1.2.3;
  • Fabric API 0.48.0;
  • MaliLib 0.12.1;
  • ModMenu 3.1.0.

To Reproduce
Steps to reproduce the behavior:

  1. Go to singleplayer or multiplayer world;
  2. Open chat;
  3. Open AdvancedChat settings;
  4. Go to Chat Filters, click New Filter and then Configure;
  5. Import filter from Additional Context;
  6. In test input write any matching string;
  7. Press Test Input;
  8. See error.

Expected behavior
I expected to see an in-game error, similar to RegEx parse error.

Video

IndexOutOfBoundsException.mp4

Additional context
Here's filter, that I used:

{"name":"headphone","active":false,"stripColors":true,"findString":"(.*) (.*)","findType":"regex","replaceType":"fullmessage","replaceTo":"$1 $2 $3","replaceTextColor":false,"textColor":"#FFFFFFFF","replaceBackgroundColor":false,"backgroundColor":"#FFFFFFFF","processors":{"forward":{"active":true},"actionbar":{"active":false},"sound":{"active":false,"notifySound":"none","soundPitch":1.0,"soundVolume":1.0},"narrator":{"active":false,"message":"$1"},"konstruct":{"active":false,"nodeData":""}},"order":0}

And here's crash report:
crash-2022-05-27_14.09.44-client.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions