Mountiful_Command doesn't expect nil arguments #44


  • New
  • Defect
Open
Assigned to jwensley2
  • _ForgeUser1191878 created this issue Jan 17, 2011

    What steps will reproduce the problem?
    1. Create a macro like this: /mount [nocombat,noflyable][modifier:shift] FastGround pre
    2. Use that macro somewhere its conditions are not met (e.g. middle of Orgrimmar, as long as you're Horde)

    What is the expected output? What do you see instead?
    I expect no action, similar to the behavior of the /cast command.  Instead I get a Lua error:
    Message: ..\AddOns\Mountiful\Mountiful.lua line 680:
       bad argument #1 to 'strlower' (string expected, got nil)
    Debug:
       [C]: ?
       [C]: strlower()
       Mountiful\Mountiful.lua:680: Mountiful_Command()
       Mountiful\Mountiful.lua:141: value()
       ..\FrameXML\ChatFrame.lua:4147: ChatEdit_ParseText()
       ..\FrameXML\ChatFrame.lua:3737: ChatEdit_SendText()
       ..\FrameXML\ChatFrame.lua:2536:
          ..\FrameXML\ChatFrame.lua:2529
       [C]: UseAction()
       ..\FrameXML\SecureTemplates.lua:274: handler()
       ..\FrameXML\SecureTemplates.lua:541:
          ..\FrameXML\SecureTemplates.lua:489
       [C]: ?
       ..\FrameXML\SecureHandlers.lua:264:
          ..\FrameXML\SecureHandlers.lua:261
       [C]: ?
       ..\FrameXML\SecureHandlers.lua:294:
          ..\FrameXML\SecureHandlers.lua:277
       (tail call): ?

    What version of the product are you using?
    r210

    Please provide any additional information below.
    I will attach a patch that corrects this while still preserving the behavior of "/mount" alone opening the options window.

  • _ForgeUser1191878 added the tags New Defect Jan 17, 2011
  • _ForgeUser1191878 added an attachment allow_nil_command.patch Jan 17, 2011

    allow_nil_command.patch

    <p>Short-circuits Mountiful_Command if&nbsp;&nbsp;SecureCmdOptionParse returns nil</p>


To post a comment, please login or register a new account.