fix buffer overflow

in case when token->original_text.length is 0 it goes below allocated buffer.