diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-11-22 02:58:17 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-11-22 02:58:17 +0300 |
commit | 6a70eed4819ec4ad1619d030f18f476196fb29f3 (patch) | |
tree | cb5654461bdf11323d151fd3e71c7a6118b52db5 /moses/PrefixTree.h | |
parent | ef1262a17f63ef2802b1f87c9bedfd0fae961e05 (diff) |
Bug fix in a sanity check in PrefixTree.h
Diffstat (limited to 'moses/PrefixTree.h')
-rw-r--r-- | moses/PrefixTree.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/moses/PrefixTree.h b/moses/PrefixTree.h index 6dc7858a2..c65daa691 100644 --- a/moses/PrefixTree.h +++ b/moses/PrefixTree.h @@ -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]); } |