Diffstat (limited to 'noncore/apps/opie-reader/Bkmks.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index 00141a3..45aa045 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp | |||
@@ -330,32 +330,33 @@ Bkmk* BkmkFile::read05(BkmkFile* /*_this*/, FILE* f) | |||
330 | Bkmk* b = NULL; | 330 | Bkmk* b = NULL; |
331 | if (f != NULL) | 331 | if (f != NULL) |
332 | { | 332 | { |
333 | unsigned short ln; | 333 | unsigned short ln; |
334 | if (fread(&ln,sizeof(ln),1,f) == 1) | 334 | if (fread(&ln,sizeof(ln),1,f) == 1) |
335 | { | 335 | { |
336 | tchar* nm = new tchar[ln+1]; | 336 | tchar* nm = new tchar[ln+1]; |
337 | fread(nm,sizeof(tchar),ln,f); | 337 | fread(nm,sizeof(tchar),ln,f); |
338 | nm[ln] = 0; | 338 | nm[ln] = 0; |
339 | fread(&ln,sizeof(ln),1,f); | 339 | fread(&ln,sizeof(ln),1,f); |
340 | tchar* anno = new tchar[ln+1]; | 340 | tchar* anno = new tchar[ln+1]; |
341 | if (ln > 0) fread(anno,sizeof(tchar),ln,f); | 341 | if (ln > 0) fread(anno,sizeof(tchar),ln,f); |
342 | anno[ln] = 0; | 342 | anno[ln] = 0; |
343 | unsigned int pos; | 343 | unsigned int pos; |
344 | fread(&pos,sizeof(pos),1,f); | 344 | fread(&pos,sizeof(pos),1,f); |
345 | b = new Bkmk(nm,anno,pos); | 345 | b = new Bkmk(nm,anno,pos); |
346 | delete [] anno; | ||
346 | } | 347 | } |
347 | } | 348 | } |
348 | return b; | 349 | return b; |
349 | } | 350 | } |
350 | 351 | ||
351 | Bkmk* BkmkFile::read06(BkmkFile* /*_this*/, FILE* f) | 352 | Bkmk* BkmkFile::read06(BkmkFile* /*_this*/, FILE* f) |
352 | { | 353 | { |
353 | Bkmk* b = NULL; | 354 | Bkmk* b = NULL; |
354 | if (f != NULL) | 355 | if (f != NULL) |
355 | { | 356 | { |
356 | unsigned short ln; | 357 | unsigned short ln; |
357 | if (fread(&ln,sizeof(ln),1,f) == 1) | 358 | if (fread(&ln,sizeof(ln),1,f) == 1) |
358 | { | 359 | { |
359 | b = new Bkmk; | 360 | b = new Bkmk; |
360 | b->m_namelen = ln; | 361 | b->m_namelen = ln; |
361 | b->m_name = new unsigned char[b->m_namelen]; | 362 | b->m_name = new unsigned char[b->m_namelen]; |