#85: allowed uppercase keywords

This commit is contained in:
Louis Rubet 2017-06-21 23:22:22 +02:00
parent 6aaf45f2ea
commit ef0e5671ab
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ static ret_value get_fn(const char* fn_name, program_fn_t& fn, cmd_type_t& type)
unsigned int i = 0;
while(s_keywords[i].type != cmd_max)
{
if (strncmp(fn_name, s_keywords[i].name, sizeof(s_keywords[i].name)) == 0)
if (strncasecmp(fn_name, s_keywords[i].name, sizeof(s_keywords[i].name)) == 0)
{
fn = s_keywords[i].fn;
type = s_keywords[i].type;

View file

@ -169,7 +169,7 @@ public:
bool compare_branch(branch* b, const char* str_to_compare, int len)
{
if (b->_len >= len)
return strncmp(b->_value, str_to_compare, len) == 0;
return strncasecmp(b->_value, str_to_compare, len) == 0;
else
return false;
}