From 7f8d53438a019d9834d7ed66844aa46b0e175e94 Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Tue, 22 Oct 2013 07:44:21 +0000 Subject: git-svn-id: https://phat.googlecode.com/svn/trunk@141 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- include/phat/boundary_matrix.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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 ); } } -- cgit v1.2.3