changed the tokenizer not to read ahead before returning a token

This commit is contained in:
hyunghwan.chung
2016-09-23 08:56:25 +00:00
parent 2ea673dc23
commit 52d3e2528e
4 changed files with 129 additions and 80 deletions

View File

@ -2747,13 +2747,13 @@ static prim_t primitives[] =
};
int stix_getprimno (stix_t* stix, const stix_oocs_t* name)
int stix_getprimno (stix_t* stix, const stix_ooch_t* ptr, stix_oow_t len)
{
int i;
for (i = 0; i < STIX_COUNTOF(primitives); i++)
{
if (stix_compucxbcstr(name->ptr, name->len, primitives[i].name) == 0)
if (stix_compucxbcstr(ptr, len, primitives[i].name) == 0)
{
return i;
}