mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
134 stars 13 forks source link

[UserSex] MBBSEmu - case sensitive gender, crashes MBBSEmu on lowercase #618

Closed brianmiller closed 10 months ago

brianmiller commented 10 months ago

Module Information

Describe the bug MBBSEmu crashes with the following error when a new user is created and a lowercase 'm' or 'f' is passed when prompted for gender. Capital letters 'M' and 'F' do not crash the system.

Unhandled exception. System.ArgumentOutOfRangeException: Only M or F are supported for userSex in The MajorBBS/Worldgroup (Parameter 'userSex')
   at MBBSEmu.HostProcess.Structs.UserAccount..ctor(String userName, Char userSex)
   at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.SignupGenderInput(SessionBase session)
   at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.ProcessSessionState(SessionBase session, Dictionary`2 modules)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()

To Reproduce Steps to reproduce the behavior:

  1. Connect to MBBSEmu
  2. Create a new account and pass 'm' instead of 'M' when prompted for gender
  3. Watch the MBBSEmu engine log

Expected behavior Don't crash: maybe just force all strings to one case, upper or lower

Software Information: