diff options
| author | zhengchao <[email protected]> | 2018-10-05 14:33:58 +0800 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2018-10-05 14:33:58 +0800 |
| commit | d587b62628dd00eec8f2c9e71676cea7ca1f620e (patch) | |
| tree | 48d02729358a4ecaf61d2414f1d9897bf618ae43 /src/MESA_field_stat.cpp | |
| parent | 4474647dc73f2881fb62853f9e070815565fddce (diff) | |
调整制线。
Diffstat (limited to 'src/MESA_field_stat.cpp')
| -rw-r--r-- | src/MESA_field_stat.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/MESA_field_stat.cpp b/src/MESA_field_stat.cpp index e456c0e..81cedc4 100644 --- a/src/MESA_field_stat.cpp +++ b/src/MESA_field_stat.cpp @@ -1041,6 +1041,10 @@ static int output_style_table(struct FS_space_t* _handle,long long interval_ms,c display_manifest_t* p_column=NULL,*p_line=NULL; double ratio=0.0,speed=0.0; long long value=0; + if(_handle->column_cnt==0) + { + return 0; + } for(i=0;i<_handle->column_cnt;i++) { if(i==0) @@ -1096,7 +1100,7 @@ static int output_style_table(struct FS_space_t* _handle,long long interval_ms,c pos+=snprintf(pos,size-(pos-print_buf),"\n"); } -/* if(pos-print_buf>0) + if(pos-print_buf>0) { if(*(pos-1)=='\n') { @@ -1104,7 +1108,6 @@ static int output_style_table(struct FS_space_t* _handle,long long interval_ms,c } pos+=snprintf(pos,size-(pos-print_buf),"\n%s\n",draw_line); } -*/ return pos-print_buf; } static int print_histogram_head(long long * bins, int bin_num, char*print_buf, unsigned int size) |
