Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #130 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

Double.parser parsing does not check src boundaries.

Reported by: keinfarbton Assigned to: kris
Priority: major Milestone: 1.0
Component: Tango Version:
Keywords: Cc:

Description

Double parse does the parsing, without looking at the src boundaries. This can lead do strange errors. E.g:

   char[] str = "1.0e";
   char[] parse_str = str[0..3]; // "1.0"
   Double.parse( parse_str ); // array bounds error.

Or this:

   char[] str = "1.012345678";
   char[] parse_str = str[0..3]; // "1.0"
   Double.parse( parse_str ); // results in 1.01234... not 1.0

Change History

11/01/06 06:00:35 changed by larsivi

Workaround in [942]

11/01/06 06:00:55 changed by larsivi

  • milestone set to 0.8.

11/25/06 03:38:54 changed by larsivi

  • milestone changed from 0.8 to 0.9.

12/18/06 16:28:51 changed by kris

  • status changed from new to assigned.
  • milestone changed from 0.9 to 1.0.

This will have be postponed a bit

01/07/07 17:52:28 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.