Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 026e73b2609ebda85799acec5b18100a8bc12c79
Ticket: 3588366fffffffffffffffffffffffffffffffff
string range bug
User & Date: egavilan on 2012-11-19 04:47:20
Changes

  1. icomment:
    Yes. The compiled path has a bug. I've tracked it down to generic/tclExecute.c, line 4865.
    
    The following patch fixes the issue:
    
    Index: generic/tclExecute.c
    ==================================================================
    --- generic/tclExecute.c
    +++ generic/tclExecute.c
    @@ -4960,13 +4960,10 @@
            } else if (fromIdx >= length) {
                fromIdx = length;
            }
            if (toIdx < -1) {
                toIdx += 1 + length;
    -           if (toIdx < 0) {
    -               toIdx = 0;
    -           }
            } else if (toIdx >= length) {
                toIdx = length - 1;
            }
    
            /*
    
    
    
    
  2. login: "egavilan"
  3. mimetype: "text/plain"
  4. username: "egavilan"