Skip to content

Commit

Permalink
fix #6201
Browse files Browse the repository at this point in the history
  • Loading branch information
rt committed Apr 11, 2019
1 parent 66073d5 commit c3cff8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rts/Sim/Units/CommandAI/CommandDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ int CCommandDescriptionCache::CalcHash(const SCommandDescription& cd) const
hash = HsiehHash(&cd.disabled , sizeof(cd.disabled) , hash);
hash = HsiehHash(&cd.showUnique , sizeof(cd.showUnique) , hash);
hash = HsiehHash(&cd.onlyTexture , sizeof(cd.onlyTexture), hash);
hash = HsiehHash(cd.name.data() , cd.name.size() , hash);

// exclude name from stockpile command-descr hashes, since those
// use the string to stash numStockpiled/numStockpileQued counts
// (which would overflow the cache if considered unique)
if (cd.id != CMD_STOCKPILE)
hash = HsiehHash(cd.name.data() , cd.name.size() , hash);

hash = HsiehHash(cd.action.data() , cd.action.size() , hash);
hash = HsiehHash(cd.iconname.data() , cd.iconname.size() , hash);
hash = HsiehHash(cd.mouseicon.data(), cd.mouseicon.size() , hash);
Expand Down

0 comments on commit c3cff8e

Please sign in to comment.