#include "edlsession.h"
#include "file.h"
#include "filesystem.h"
+#include "filexml.h"
#include "indexable.h"
#include "language.h"
#include "localsession.h"
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
- 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);
}
else {
window_y = atoi(data + i);
- break;
+ state = -1;
}
while( i<data_size && isdigit(data[i]) ) ++i;
}
- data[data_size] = 0;
+ temp_keyframe.xbuf->iseek(i);
read_data(&temp_keyframe);
}