diff options
author | Christian Grothoff <christian@grothoff.org> | 2005-06-06 19:11:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2005-06-06 19:11:59 +0000 |
commit | 26717f412447dae0e72d14f95c3b1eae5fc80bb3 (patch) | |
tree | 6eb1153989a35b4b62409462cbe61986ad2a7d95 | |
parent | 6e1bf22bb07f8117a7a01857277cd58c4aeb3fac (diff) | |
download | gnunet-gtk-26717f412447dae0e72d14f95c3b1eae5fc80bb3.tar.gz gnunet-gtk-26717f412447dae0e72d14f95c3b1eae5fc80bb3.zip |
fix
-rw-r--r-- | src/upload.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/upload.c b/src/upload.c index 8bb46fcc..dd57bfeb 100644 --- a/src/upload.c +++ b/src/upload.c | |||
@@ -383,7 +383,7 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy, | |||
383 | size_t ts; | 383 | size_t ts; |
384 | char * mvalue; | 384 | char * mvalue; |
385 | char ** keywords; | 385 | char ** keywords; |
386 | unsigned int pos; | 386 | unsigned int kpos; |
387 | unsigned int ksize; | 387 | unsigned int ksize; |
388 | 388 | ||
389 | extractors = EXTRACTOR_loadDefaultLibraries(); | 389 | extractors = EXTRACTOR_loadDefaultLibraries(); |
@@ -598,6 +598,7 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy, | |||
598 | GROW(keywords, | 598 | GROW(keywords, |
599 | ksize, | 599 | ksize, |
600 | 64); | 600 | 64); |
601 | kpos = 0; | ||
601 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(keymodel), | 602 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(keymodel), |
602 | &iter)) { | 603 | &iter)) { |
603 | do { | 604 | do { |
@@ -605,19 +606,19 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy, | |||
605 | &iter, | 606 | &iter, |
606 | 0, &mvalue, | 607 | 0, &mvalue, |
607 | -1); | 608 | -1); |
608 | keywords[pos++] = mvalue; | 609 | keywords[kpos++] = mvalue; |
609 | if (pos == ksize) | 610 | if (kpos == ksize) |
610 | GROW(keywords, | 611 | GROW(keywords, |
611 | ksize, | 612 | ksize, |
612 | pos*2); | 613 | kpos*2); |
613 | } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(keymodel), | 614 | } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(keymodel), |
614 | &iter)); | 615 | &iter)); |
615 | } | 616 | } |
616 | keywords[pos] = NULL; | 617 | keywords[kpos] = NULL; |
617 | 618 | ||
618 | keywordURI = ECRS_keywordsToUri((const char**)keywords); | 619 | keywordURI = ECRS_keywordsToUri((const char**)keywords); |
619 | while (pos > 0) | 620 | while (kpos > 0) |
620 | FREE(keywords[--pos]); | 621 | FREE(keywords[--kpos]); |
621 | GROW(keywords, | 622 | GROW(keywords, |
622 | ksize, | 623 | ksize, |
623 | 0); | 624 | 0); |