Faulty range-checking with WideString
Original Reporter info from Mantis: starfish
-
Reporter name: Sandor Horvath
Original Reporter info from Mantis: starfish
- Reporter name: Sandor Horvath
Description:
Obviously we index the WideString as it was array of WideChar (Word size elements) but the rangechecking treats it as it was array of Char (Byte size elements). The Length gives us the proper lenght counted as WideChars but I can overindex it to Length * 2 without an error. If I try to access Length * 2 + 1 I get an ERangeError. See the attached source!
Mantis conversion info:
- Mantis ID: 10013
- Version: 2.2.0
- Fixed in version: 2.2.2
- Fixed in revision: 9006 (#4420e1e7)