Talia-12 / MoreIotas

An addon for Hex Casting, adding new types of iotas such as Strings.
MIT License
1 stars 7 forks source link

Whisper's Reflection does not seem to like long strings or something? #26

Open macks2008 opened 3 months ago

macks2008 commented 3 months ago

Whisper machine broke image

Expected behavior

the chat parser should:

  1. take my message
  2. strip the first occurrence of my Sifter's prefix
  3. and make a string Iota with it

Actual behavior

With long strings (or some other trigger, not sure yet), it seemingly duplicates + concatenates the result of step 1.

Reproduction steps

I'm not sure what the MINIMUM reproduction steps are, but so far this has been consistent:

  1. Set a sifter's prefix to ">>>"
  2. send ">>>Room 0x7203cea5 Twisted_Codes would-be quencher" in chat. Maybe play around with it's length or something
  3. Draw "whisper's reflection"
  4. bug occurs.

Additional information

of note, when I tested my reproduction steps, I noticed that it seems to add "#" before "Twisted_Codes", even though, for testing purposes, my string no longer has a "#". "Reveal" posted the following messages to chat (note that I also tried removing my nickname on the server since the nickname display begins with a hash mark)

[09:37:39] [Render thread/INFO]: [CHAT] "Room 0x7203cea5 Twisted_Codes would-be quencher>>>Room 0x7203cea5 #Twisted_Codes would-be quencher"
[09:38:11] [Render thread/INFO]: [CHAT] Your nickname has been removed!
[09:38:21] [Render thread/INFO]: [CHAT] "Room 0x7203cea5 Twisted_Codes would-be quencher>>>Room 0x7203cea5 #Twisted_Codes would-be quencher"

speaking of which, here's the full log file. I'm sure you'll find it forgive the Hex Casting pun enlightening:

latest.log

macks2008 commented 3 months ago

Minimum string to cause it seems to be my Minecraft screen name? image

macks2008 commented 3 months ago

Trying to figure out how this bug happens for myself (it seems like it's probably simple enough I could PR it, or so I was hoping) I looked at OpChatString and... I don't see anything wrong there, but I also don't see the part where it's supposed to strip the prefix. Where is that part of the logic defined? Sorry I'm a bit stupid with Java and straight up clueless with Kotlin (I've really only seen the latter as part of the various hex and hex add-on projects) :-)