[input] proper escape trie traversal

pull/2166/head
nick black 3 years ago
parent 0c16296b96
commit 37fbd385bb
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1235,10 +1235,11 @@ process_escape(inputctx* ictx, const unsigned char* buf, int buflen){
handoff_initial_responses(ictx);
}
logtrace("triepos: %p in: %u special: 0x%08x\n", ictx->triepos, buf[used], ictx->triepos->special);
if((ictx->triepos = ictx->triepos->trie[buf[used]]) == NULL){
ictx->triepos = ictx->inputescapes;
}else if(ictx->triepos->special != NCKEY_INVALID){
if(ictx->triepos->special != NCKEY_INVALID){
special_key(ictx);
ictx->triepos = ictx->inputescapes;
}else if((ictx->triepos = ictx->triepos->trie[buf[used]]) == NULL){
ictx->triepos = ictx->inputescapes;
}
++used;
}

Loading…
Cancel
Save