STR #2823.1/2: avoiding setting "dirty" flag in a read operation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12304 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2017-07-07 20:34:28 +00:00
parent d9460d787b
commit 7542e8cb16
+2 -2
View File
@@ -1165,7 +1165,8 @@ void Fl_Preferences::Node::set( const char *line ) {
dirty_ = dirt;
}
// add more data to an existing entry
// Append data to an existing node. This is only used in read operations when
// a single entry stretches over multiple lines in the prefs file.
void Fl_Preferences::Node::add( const char *line ) {
if ( lastEntrySet<0 || lastEntrySet>=nEntry_ ) return;
char *&dst = entry_[ lastEntrySet ].value;
@@ -1173,7 +1174,6 @@ void Fl_Preferences::Node::add( const char *line ) {
size_t b = strlen( line );
dst = (char*)realloc( dst, a+b+1 );
memcpy( dst+a, line, b+1 );
dirty_ = 1;
}
// get the value for a name, returns 0 if no such name