About HashTable
Issue #267
resolved
For Delphi.
In dwsHashtables.pas
There’s code as follow :
var
HashTable: array[#0..#255] of Byte;
InsensitiveHashTable: array[#0..#255] of Word;
Some thing wrong:
- Length(HashTable) = 63734
- HashTable[I] := Ord(I); // Because the base type of HashTable is Byte, Then Ord(I) maybe overflow.
- ETC.
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Fixed Issue
#267prevent overflow in legacy dwsHashTables - do not use for new codes, that unit may be removed in the future→ <<cset 3295c849881f>>
- Log in to comment
You’re right. That unit is legacy though, and serves no purpose outside of very old DWS code. I’ll push a fix, but it might be best to remove it entirely at some point.