• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

HIVE

Waffle
Waffle
lets say we have a hashtable from string to integer.

lets say we have a trigger that takes a player name and returns player id by looking it up from the hashtable. lets say we got 2 unlucky players A and B.
these players got different names but StringHash(GetPlayerName(A)) == StringHash(GetPlayerName(A))

thus if we get the name of player A from somewhere and look it up in the hashtable we might in stead get player B (because that was added last and overrode the original entry)
the main issue is that hashtables don't use the actual string as a key but the hash of the string. unless you specifically test for conflicts you will never know that 2 entries collide and the earlier one gets trampled and overwritten.
.....
Top