common: fix segfault if attempting to autocomplete an emtpy console buffer