expandAlias("command", nil) should not error
Bug #1456794 reported by
Vadim Peretokin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mudlet |
Opinion
|
Low
|
Unassigned |
Bug Description
expandAlias("x", nil) currently gives this error: <Send: wrong argument type>
expandAlias("x", nil) should be treated the same as expandAlias("x")
Changed in mudlet: | |
importance: | Undecided → Low |
To post a comment you must log in.
This Lua sub-system command is mapped to TLuaInterpreter ::Send( ...) and the second argument, if specified, is a boolean that is recorded as wantPrint (and defaults to TRUE if NOT specified) and then dispatched to the Host class instance with:
pHost->send( QString( luaSendText.c_str() ), wantPrint, false );
Given that boolean FALSE seems to be largely inter-changeable with NIL I don't see how expandAlias("x", nil) can be treated as expandAlias("x") when the latter is already coded as expandAlias("x", true) and NOT expandAlias("x", false)...
I suspect this will become a WON'T FIX or it will break existing code won't it?
Fair enough, the error messages are not up to scratch for this function, but sadly that is not uncommon!