trunk/src/lib/util/corefile.c
| r29544 | r29545 | |
| 410 | 410 | file->back_char_tail = 0; |
| 411 | 411 | |
| 412 | 412 | /* handle real files */ |
| 413 | | if (file->data == NULL) |
| 413 | if (file->length && file->data == NULL) |
| 414 | 414 | { |
| 415 | 415 | /* if we're within the buffer, consume that first */ |
| 416 | 416 | if (file->offset >= file->bufferbase && file->offset < file->bufferbase + file->bufferbytes) |
| r29544 | r29545 | |
| 657 | 657 | UINT32 read_length; |
| 658 | 658 | |
| 659 | 659 | /* if we already have data, just return it */ |
| 660 | | if (file->data != NULL) |
| 660 | if (file->data != NULL || !file->length) |
| 661 | 661 | return file->data; |
| 662 | 662 | |
| 663 | 663 | /* allocate some memory */ |