Changeset 221549c in serd


Ignore:
Timestamp:
04/24/17 13:33:23 (3 months ago)
Author:
David Robillard <d@…>
Branches:
master, serd1
Children:
21211d7
Parents:
52d3653
Message:

Fix reading with non-standard page sizes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/byte_source.c

    r52d3653 r221549c  
    2222    source->read_head = 0; 
    2323    size_t n_read = source->read_func( 
    24         source->file_buf, 1, SERD_PAGE_SIZE, source->stream); 
     24        source->file_buf, 1, source->page_size, source->stream); 
    2525    if (n_read == 0) { 
    2626        source->file_buf[0] = '\0'; 
    2727        return (source->error_func(source->stream) 
    2828                ? SERD_ERR_UNKNOWN : SERD_FAILURE); 
    29     } else if (n_read < SERD_PAGE_SIZE) { 
     29    } else if (n_read < source->page_size) { 
    3030        source->file_buf[n_read] = '\0'; 
    3131    } 
Note: See TracChangeset for help on using the changeset viewer.