projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
repair default keyframe load, tweak init default histogram threshold
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
pluginclient.C
diff --git
a/cinelerra-5.1/cinelerra/pluginclient.C
b/cinelerra-5.1/cinelerra/pluginclient.C
index f1fe25b9f9e90581756f5668bc12ca18c104368e..7f1fdd04323959926339ba8bc5ad108803b207ea 100644
(file)
--- a/
cinelerra-5.1/cinelerra/pluginclient.C
+++ b/
cinelerra-5.1/cinelerra/pluginclient.C
@@
-30,6
+30,7
@@
#include "edlsession.h"
#include "file.h"
#include "filesystem.h"
#include "edlsession.h"
#include "file.h"
#include "filesystem.h"
+#include "filexml.h"
#include "indexable.h"
#include "language.h"
#include "localsession.h"
#include "indexable.h"
#include "language.h"
#include "localsession.h"
@@
-557,9
+558,12
@@
void PluginClient::load_defaults_xml()
int data_size = fread(data, 1, sz, fp);
if( data_size < 0 ) data_size = 0;
if( data_size > 0 ) {
int data_size = fread(data, 1, sz, fp);
if( data_size < 0 ) data_size = 0;
if( data_size > 0 ) {
+ data[data_size] = 0;
+ temp_keyframe.xbuf->oseek(data_size);
// Get window extents
// Get window extents
- int state = 0;
- for( int i=0; i<(data_size-8) && data[i]!='<'; ++i ) {
+ int i = 0;
+ for( int state=0; i<(data_size-8) && state>=0; ++i ) {
+ if( !data[i] || data[i] == '<' ) break;
if( !isdigit(data[i]) ) continue;
if( !state ) {
window_x = atoi(data + i);
if( !isdigit(data[i]) ) continue;
if( !state ) {
window_x = atoi(data + i);
@@
-567,11
+571,11
@@
void PluginClient::load_defaults_xml()
}
else {
window_y = atoi(data + i);
}
else {
window_y = atoi(data + i);
-
break
;
+
state = -1
;
}
while( i<data_size && isdigit(data[i]) ) ++i;
}
}
while( i<data_size && isdigit(data[i]) ) ++i;
}
-
data[data_size] = 0
;
+
temp_keyframe.xbuf->iseek(i)
;
read_data(&temp_keyframe);
}
read_data(&temp_keyframe);
}