[awesome-menu] Fix wrong size in a_strcpy()

This commit is contained in:
Julien Danjou 2008-03-09 16:15:34 +01:00
parent 5b2e9c0139
commit f00008938f
1 changed files with 3 additions and 2 deletions

View File

@ -268,6 +268,7 @@ item_list_fill_file(const char *directory)
static void
complete(Bool reverse)
{
char *word;
int loop = 2;
item_t *item = NULL;
item_t *(*item_iter)(item_t **, item_t *) = item_list_next_cycle;
@ -284,8 +285,8 @@ complete(Bool reverse)
{
if(item->match)
{
/* XXX sizeof wrong */
a_strcpy(get_last_word(globalconf.text), ssizeof(globalconf.text), item->data);
word = get_last_word(globalconf.text);
a_strcpy(word, sizeof(globalconf.text) - (word - globalconf.text), item->data);
globalconf.item_selected = item;
return;
}