summaryrefslogtreecommitdiff
path: root/include/phat/boundary_matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/phat/boundary_matrix.h')
-rw-r--r--include/phat/boundary_matrix.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/phat/boundary_matrix.h b/include/phat/boundary_matrix.h
index bcb2541..940138f 100644
--- a/include/phat/boundary_matrix.h
+++ b/include/phat/boundary_matrix.h
@@ -327,7 +327,8 @@ namespace phat {
for( index cur_col = 0; cur_col < num_cols; cur_col++ ) {
index num_rows = buffer[ cur_col + 1 ] - buffer[ cur_col ];
temp_col.resize( num_rows );
- input_stream.read( (char*)&temp_col[ 0 ], sizeof( int64_t ) * temp_col.size() );
+ if( num_rows > 0 )
+ input_stream.read( (char*)&temp_col[ 0 ], sizeof( int64_t ) * temp_col.size() );
set_col( cur_col, temp_col );
}
}