I feel almost embarrassed to ask but it something that I have thought about for awhile. When coding new skills or commands I typically do what most people do and have something like:
if(!argument || argument[0] == '\0')
{
}
However, I was thinking; do I even need the "!argument"
section? The only way a problem would arise would be if I called said code from in the code itself and sent NULL. Otherwise wouldn't it always send "" if you just typed a command/skill, right?
if(!argument || argument[0] == '\0')
{
}
However, I was thinking; do I even need the "!argument"
section? The only way a problem would arise would be if I called said code from in the code itself and sent NULL. Otherwise wouldn't it always send "" if you just typed a command/skill, right?