changeset 2673:9944c7923d5b

Fixed a bug causing crash when output pixel obj type in ascii format
author Vladimir S. FONOV <vladimir.fonov@gmail.com>
date Wed, 18 Apr 2012 17:00:12 -0400
parents 99d4a3bb68df
children b99d8f1c2402
files volume_io/Prog_utils/files.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/volume_io/Prog_utils/files.c
+++ b/volume_io/Prog_utils/files.c
@@ -2521,7 +2521,7 @@
         }
         else
         {
-            if( fprintf( file, "%d", (int) *c ) != 1 )
+            if( fprintf( file, "%d", (int) *c ) < 0  )
             {
                 print_error( "Error outputting unsigned char.  " );
                 print_system_error();