Skip to content

Commit 7b4383a

Browse files
committed
small fix
1 parent faef4b0 commit 7b4383a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/bsp2mtx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ int main(int argc, char** argv) {
2121
printf(" === Reading file... ===\n");
2222
bsp_matrix_t matrix = bsp_read_matrix(input_fname, NULL);
2323
printf(" === Done writing. ===\n");
24-
matrix = bsp_convert_matrix(matrix, BSP_COO);
24+
if (matrix.format != BSP_COO){
25+
matrix = bsp_convert_matrix(matrix, BSP_COO);
26+
}
27+
2528
printf(" === Writing to %s... ===\n", output_fname);
2629
bsp_mmwrite(output_fname, matrix);
2730
printf(" === Done writing. ===\n");

0 commit comments

Comments
 (0)