Artifacts Associated With Ticket 675356ffffffffff
Ticket change [5505ad0136] (rid 94056) by nobody on 2003-01-27 11:05:15:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
tclClock.c 88: switch ((enum command) index) { 89: case COMMAND_CLICKS: { /* clicks */ 90: int forceMilli = 0; 91: 92: if (objc == 3) { 93: format = Tcl_GetStringFromObj(objv[2], &index); 94: if (strncmp(format, "-milliseconds", 95: (unsigned int) index) == 0) { 96: forceMilli = 1; 97: } else { 98: Tcl_AppendStringsToObj(resultPtr, 99: "bad switch \"", format, 100: "\": must be -milliseconds", (char *) NULL); 101: return TCL_ERROR; 102: } The 'n' argument to strncmp should not be index (which happens to be 0), but presumably strlen("-milliseconds") ==13. - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "06. Time Measurement"
- title initialized to: "clock clicks -milliseconds logic confused"
- type initialized to: "Bug"
Ticket change [ee37137e12] (rid 104044) by nobody on 2003-01-27 18:14:01:
- icomment:
Logged In: NO Also notice that "clock clicks -milliseconds" is giving negative results: % clock clicks -milli -11350295 Is this correct behaviour or is this an int/long casting issue?
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [7bd6194135] (rid 96972) by kennykb on 2003-02-02 04:37:36:
- closedate changed to: "2003-02-01T21:37:36"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 No bug here, except for the little bug that [clock clicks {}] and [clock clicks -] were being recognized as [clock clicks -milliseconds]. The 'index' variable was being reused, and at the time of the 'strncmp' call, it's the string length of objv[2]. So the logic is correct except for making sure that the string contains at least two characters. The negative value for milliseconds is also correct. See http://www.tcl.tk/cgi-bin/tct/tip/124.html for a proposal to eliminate that issue. - login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"