mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 04:43:03 +03:00
Bug fix in a sanity check in PrefixTree.h
This commit is contained in:
parent
ef1262a17f
commit
6a70eed481
@ -173,8 +173,7 @@ public:
|
||||
ptr.resize(keys.size());
|
||||
std::vector<OFF_T> rawOffs(keys.size());
|
||||
size_t bytes_read = fread(&rawOffs[0], sizeof(OFF_T), keys.size(), f);
|
||||
UTIL_THROW_IF2(bytes_read != sizeof(OFF_T) * keys.size(),
|
||||
"Read error at " << HERE);
|
||||
UTIL_THROW_IF2(bytes_read != keys.size(), "Read error at " << HERE);
|
||||
for(size_t i=0; i<ptr.size(); ++i)
|
||||
if (rawOffs[i]) ptr[i].set(f, rawOffs[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user