Commit 073fd36b authored by Kai Zhang's avatar Kai Zhang

fix a bug in c code

parent 2164c9d2
......@@ -342,7 +342,7 @@ igraph_strvector_t* bsvector_to_strvector(bsvector_t* from) {
igraph_strvector_t *str;
size_t i;
igraph_strvector_init(str, from->len);
for (i = 0; i++; i < from->len) {
for (i = 0; i < from->len; i++) {
igraph_strvector_set(str, i, bytestring_to_char(from->data[i]));
}
return str;
......@@ -352,8 +352,8 @@ bsvector_t* strvector_to_bsvector(igraph_strvector_t* from) {
bsvector_t *str;
size_t i;
bsvector_init(str, from->len);
for (i = 0; i++; i < from->len) {
for (i = 0; i < from->len; i++) {
bsvector_set(str, i, char_to_bytestring(from->data[i]));
}
return str;
}
}
\ No newline at end of file
......@@ -466,8 +466,6 @@ int igraph_haskell_attribute_add_edges(igraph_t *graph, const igraph_vector_t *e
}
if (oldrec->type == IGRAPH_ATTRIBUTE_STRING) {
if (ne != bsvector_size(newstr)) {
printf("number of edges: %d\n", ne);
printf("number of attributes: %d\n", bsvector_size(newstr));
IGRAPH_ERROR("Invalid string attribute length", IGRAPH_EINVAL);
}
IGRAPH_CHECK(bsvector_append(oldstr, newstr));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment