gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master fbc1fb4: Table: allocating names of columns to


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master fbc1fb4: Table: allocating names of columns to read for selection
Date: Thu, 19 Sep 2019 15:20:57 -0400 (EDT)

branch: master
commit fbc1fb4c0e725912305d28988786cc522c108d27
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Table: allocating names of columns to read for selection
    
    In the recent commit where the selection operations of Table were
    re-written, I had forgot to allocate space for the column identifiers when
    it necessary to read them. We thus had a crash.
    
    With this commit, the allocation flag is now set and the crash is fixed.
    Also, I noticed that there was an extra redundant `;' in
    `ui_check_select_sort_before' which is now removed.
---
 bin/table/ui.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/table/ui.c b/bin/table/ui.c
index d12cc4b..63226a6 100644
--- a/bin/table/ui.c
+++ b/bin/table/ui.c
@@ -675,7 +675,7 @@ ui_check_select_sort_before(struct tableparams *p, 
gal_list_str_t *lines,
                             size_t *nselect, size_t *origoutncols,
                             size_t *sortindout, size_t **selectindout_out,
                             size_t **selecttypeout_out)
-{;
+{
   gal_data_t *dtmp, *allcols;
   size_t sortind=GAL_BLANK_SIZE_T;
   gal_list_sizet_t *tmp, *indexll;
@@ -850,7 +850,7 @@ ui_check_select_sort_before(struct tableparams *p, 
gal_list_str_t *lines,
                   {
                     selecttypeout[i]=k;
                     selectindout[i]=allncols++;
-                    gal_list_str_add(&add, dtmp->name, 0);
+                    gal_list_str_add(&add, dtmp->name, 1);
                   }
               }
             ++i;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]