summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Preferences.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 489383b6f..76acabfca 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1307,10 +1307,10 @@ int Fl_Preferences::Node::write( FILE *f ) {
char *src = entry_[i].value;
if ( src ) { // hack it into smaller pieces if needed
fprintf( f, "%s:", entry_[i].name );
- size_t cnt, written;
+ size_t cnt, written = 0;
for ( cnt = 0; cnt < 60; cnt++ )
if ( src[cnt]==0 ) break;
- written = fwrite( src, cnt, 1, f );
+ written += fwrite( src, cnt, 1, f );
fprintf( f, "\n" );
src += cnt;
for (;*src;) {