Skip to content

Conversation

tommy9
Copy link
Member

@tommy9 tommy9 commented Jun 24, 2025

Closes #6274

Was able to create a minimal failing example as follows...

  1. Switched locale to Japanese in Control Panel -> Clock and Region -> Region -> Administrative to Japanese
  2. Create new xlam file with a function with signature Public Function a(Optional b As String = "擐") As String
  3. Password protect the xlam VBA project
  4. Create new file and add a reference to the xlam file
  5. Add code using the new function e.g. Debug.Print AnAddin.a("f")
  6. Refresh Rubberduck and get "Unexpected Error" as the status

Note, if trying this, make sure to change the locale back or Visual Studio wants to change some characters within the Rubberduck project.

The code was failing with an overflow error in the line tokens.Add($"ChrW$(&H{Convert.ToInt16(character):X})");

Have changed this to ToInt32, similar to a previous fix #6178

Tested that Rubberduck parses successfully after this change.

@rubberduck-vba-releasebot
Copy link
Member

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.58%. Comparing base (1bcc6df) to head (6266fe1).
Report is 25 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #6275   +/-   ##
=======================================
  Coverage   97.58%   97.58%           
=======================================
  Files           4        4           
  Lines         413      413           
  Branches       28       28           
=======================================
  Hits          403      403           
  Misses          6        6           
  Partials        4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Vogel612
Copy link
Member

Vogel612 commented Jun 24, 2025

awesome work on setting up a repro and fixing this one :)

@Vogel612 Vogel612 merged commit fae50ad into rubberduck-vba:next Jun 25, 2025
3 checks passed
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.

Rubberduck cannot load if using vba dark mode
3 participants