This is upstream r26 to fix wrong use of std::min on 64-bit systems
|
|
|
513 | 513 | { |
514 | 514 | fseek(idxfile, wordoffset[page_idx], SEEK_SET); |
515 | 515 | guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx]; |
516 | | fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. |
| 516 | fread(wordentry_buf, |
| 517 | std::min(sizeof(wordentry_buf), static_cast<size_t>(page_size)), |
| 518 | 1, idxfile); |
| 519 | //TODO: check returned values, deal with word entry that strlen>255. |
517 | 520 | return wordentry_buf; |
518 | 521 | } |
519 | 522 | |