Author: ghuck
Date: 2011-07-11 16:43:55 -0700 (Mon, 11 Jul 2011)
New Revision: 26145

Modified:
   csplugins/trunk/soc/ghuck/IgraphPlugin/src/igraphWrapper/igraphJNA.cpp
Log:
fixed bug

Modified: csplugins/trunk/soc/ghuck/IgraphPlugin/src/igraphWrapper/igraphJNA.cpp
===================================================================
--- csplugins/trunk/soc/ghuck/IgraphPlugin/src/igraphWrapper/igraphJNA.cpp      
2011-07-11 23:38:17 UTC (rev 26144)
+++ csplugins/trunk/soc/ghuck/IgraphPlugin/src/igraphWrapper/igraphJNA.cpp      
2011-07-11 23:43:55 UTC (rev 26145)
@@ -105,6 +105,7 @@
                       double weights[]){
 
        long int vcount = igraph_vcount(&g);
+       long int ecount = igraph_ecount(&g);
 
        igraph_matrix_t locs;
        igraph_matrix_init(&locs, vcount, 2); 
@@ -115,8 +116,8 @@
 
        igraph_vector_t weights_vector;
        if (isWeighted) {
-         igraph_vector_init(&weights_vector, vcount);
-         for (int i = 0; i < vcount; i++){
+         igraph_vector_init(&weights_vector, ecount);
+         for (int i = 0; i < ecount; i++){
            VECTOR(weights_vector)[i] = weights[i];
          } 
        }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to