Closed pkoos closed 2 years ago
Here's how the command works now when dealing with ambiguous input:
Z:1 R:200 I:0> sedit julian add relea Skill 'relea' is too ambiguous. Please specify one of the following: release release elemental release golem
Z:1 R:200 I:0> sedit julian add release 'Julian' has been given skill 'release' (368) by Julian.
Z:1 R:200 I:0> sedit julian remove releas Skill 'releas' is too ambiguous. Please specify one of the following: release release elemental release golem
Z:1 R:200 I:0> sedit julian remove release Skill 'release' (368) removed from Julian.
Z:1 R:200 I:0> sedit julian remove release e Cannot find skill 'release elemental' on 'Julian'.
Z:1 R:200 I:0> sedit julian add release e 'Julian' has been given skill 'release elemental' (169) by Julian.
Z:1 R:200 I:0> sedit julian set release e 1 'Julian' skill 'release elemental' set to 1 from 1.
example skill: release (368)
When you type sedit add it adds the incorrect skill. In this case, it adds 'release golem' (125). The reason this happens is in the find_skill_num function(), and str_n_nosp_cmp function. This searches through the given command, ending at strlen(command). If everything matches up until this point, it will return the skill number that doesn't correspond to the correct skill.
This could be OS-dependent as there is a definition flag around strncasecmp() (not sure about this).
Potential fixes: