Off-by-one in substring

Bug #162436 reported by Michael D. Adams on 2007-11-13
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Low
Abdulaziz Ghuloum

Bug Description

The R6RS standard says the start index of a substring call must be less than or equal to the string length, but your implementation throws an error when the start index is equal to the string length.

$ ikarus
Ikarus Scheme (Build 2007-11-12)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

> (substring "" 0 0)
Unhandled exception
 Condition components:
   1. &error
   2. &who: substring
   3. &message: "not a valid start index"
   4. &irritants: (0 "")

Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1048.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
status: New → Fix Committed
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted previously
will be incorporated in the next 0.0.2 release of Ikarus Scheme,
scheduled for November 28, 2007.
A release candidate tarball is available for download from:
  http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.2-rc1.tar.gz
Please do test it if you have the time and report any issues you
might encounter. Thank you very much for your support. Aziz,,,
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.2
Changed in ikarus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers