* minibuf.c (Fall_completions): Add more checks.

This commit is contained in:
Andreas Schwab
2010-06-08 19:56:21 +02:00
parent 9b27fd9f75
commit 657d4c0be3
2 changed files with 8 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
2010-06-08 Andreas Schwab <schwab@linux-m68k.org>
* minibuf.c (Fall_completions): Add more checks.
2010-06-08 Juanma Barranquero <lekktu@gmail.com>
* minibuf.c (Fall_completions): Check COLLECTION's size (bug#6378).

View File

@@ -1590,7 +1590,9 @@ with a space are ignored unless STRING itself starts with a space. */)
if (type == 2)
{
obsize = XVECTOR (collection)->size;
bucket = obsize ? XVECTOR (collection)->contents[index] : zero;
if (obsize == 0)
return Qnil;
bucket = XVECTOR (collection)->contents[index];
}
while (1)
@@ -1610,7 +1612,7 @@ with a space are ignored unless STRING itself starts with a space. */)
}
else if (type == 2)
{
if (!EQ (bucket, zero))
if (SYMBOLP (bucket))
{
elt = bucket;
eltstring = elt;