Skip to content

Fix ten bugs from a random sweep of libse/libuilogic - #14025

Merged
niksedk merged 1 commit into
mainfrom
claude/bug-hunt-2026-08-23
Aug 23, 2026
Merged

Fix ten bugs from a random sweep of libse/libuilogic#14025
niksedk merged 1 commit into
mainfrom
claude/bug-hunt-2026-08-23

Conversation

@niksedk

@niksedk niksedk commented Aug 23, 2026

Copy link
Copy Markdown
Member

A random bug hunt across libse/libuilogic; every item was reproduced with a failing test before being fixed (tests in tests/libse/Core/BugHunt20260823Test.cs).

Convert actors (Name: source) — ActorConverter.FixActorsFromBeforeColon

  1. Set color did nothingSetColor(...) result was discarded.
  2. Leading whitespace mangled the linestartIdx came from the raw line but all cuts were on the trimmed one (" Joe: How…""Joe:: ow…"; more spaces threw).
  3. → Actor field deleted the name — text was stripped but p.Actor never set; view model now copies it across too.
  4. Mr./Mrs./Dr. allowance in IsActor was dead — the non-letter guard ran first and rejected the period.

Fix casing

  1. I-ifI-If␣␣ inserted a double space.
  2. FixStutter bounds were one too strict, so N-n-no at the end of a line was never fixed.

Other

  1. Unknown 33/34/59 writers emitted 00:00:60 for 59.6 s (rounded seconds without carrying).
  2. KaraokeWordTransform skipped one char past whitespace, so a tag right after a space (<font face="Arial">) was split on its inner space.
  3. OCR CreateGuessesFromLetters multi-guess loop used < instead of <=, never trying the last position of a word (the sibling loop above it already used <=).
  4. LoadMatroskaSSA threw on a Dialogue payload with fewer commas than expected.

Verification

  • libse: 1434 passed, libuilogic: 504 passed, UI builds.

🤖 Generated with Claude Code

Convert actors (Name: source): color was computed and discarded, every
cut was indexed into the untrimmed line so leading whitespace mangled
the text, and the "to Actor field" path dropped the name instead of
setting p.Actor. IsActor also rejected "Mr."/"Dr." before its own title
allowance could run.

Fix casing: "I-if" -> "I-If " inserted a double space; FixStutter's
bounds were one too strict so a stutter at the very end of a line was
never fixed.

Unknown 33/34/59 writers rounded seconds without carrying, emitting
":60". KaraokeWordTransform overshot by one after whitespace so a tag
following a space was split on its inner space. The OCR multi-guess
loop never tried the last position of a word. LoadMatroskaSSA crashed
on a Dialogue payload with too few commas.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@niksedk
niksedk merged commit c8c1cb2 into main Aug 23, 2026
1 check passed
@niksedk
niksedk deleted the claude/bug-hunt-2026-08-23 branch August 23, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant