Tk Source Code

View Ticket
Login
Ticket UUID: f0188aca9eb1b1eb2968874abfdbc61554f296a5
Title: Color string with invalid hex digit accepted without error (Windows only)
Type: Bug Version: 8.6.6
Submitter: fvogel Created on: 2017-04-05 04:23:13
Subsystem: 30. Color Names Assigned To: simonbachmann
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2017-04-08 07:19:26
Resolution: Fixed Closed By: simonbachmann
    Closed on: 2017-04-08 07:19:26
Description:

On Windows, but not on OS X, I get the following test failure:

==== imgListFormat-6.5 ParseColor: invalid hex digit FAILED
==== Contents of test case:

    photo1 put {#ABCD #ABCZ}

---- Test completed normally; Return code was: 0
---- Return code should have been one of: 1
==== imgListFormat-6.5 FAILED

This is in branch tip-166, at [dbd8db17].

User Comments: simonbachmann (claiming to be Simon Bachmann) added on 2017-04-08 07:19:26:

Fixed in trunk: [d8a75c2f]


simonbachmann (claiming to be Simon Bachmann) added on 2017-04-05 21:17:57:
That's a bug in Tk_GetColor(), actually (Windows specific code, as the bug does not show under Linux or OS X)

  % label .l
  .l
  % .l configure -bg #ABCD
  invalid color name "#ABCD"
  % .l configure -bg #ABCZ
  %   (no error)
  % .l cget -bg
  % #ABCZ