yktoo / dklang

DKLang Localization Package
56 stars 14 forks source link

Empty constant value raised Range Check Error Exception under debuging #18

Open AndreyPS72 opened 8 years ago

AndreyPS72 commented 8 years ago

Workaround DKLang.pas:

function StreamReadUnicodeStr(Stream: TStream): UnicodeString; var w: Word; b: TBytes; begin w := StreamReadWord(Stream); if w=0 then result := '' else begin SetLength(b,w_2); Stream.ReadBuffer(b[0],w_2); result := TEncoding.Unicode.GetString(b); end; end;