mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 18:01:54 +00:00
fix build on amd64: guint32 and size_t may be different type, so usage of std::min is incorrect
This commit is contained in:
@@ -513,7 +513,10 @@ inline const gchar *offset_index::read_first_on_page_key(glong page_idx)
|
||||
{
|
||||
fseek(idxfile, wordoffset[page_idx], SEEK_SET);
|
||||
guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
|
||||
fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
|
||||
fread(wordentry_buf,
|
||||
std::min(sizeof(wordentry_buf), static_cast<size_t>(page_size)),
|
||||
1, idxfile);
|
||||
//TODO: check returned values, deal with word entry that strlen>255.
|
||||
return wordentry_buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user