diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2008-07-26 11:17:23 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2008-07-26 11:17:23 (GMT) |
commit | 1acd9f166d4f1442a5192a1ef89e1d5a12ca0850 (patch) | |
tree | 5a7a6e841bda9c6edc8403701a5462ca2de81e67 /win | |
parent | 4fc8dfa26f973625434ef8540a653749d74678ac (diff) | |
download | tk-1acd9f166d4f1442a5192a1ef89e1d5a12ca0850.zip tk-1acd9f166d4f1442a5192a1ef89e1d5a12ca0850.tar.gz tk-1acd9f166d4f1442a5192a1ef89e1d5a12ca0850.tar.bz2 |
bug #2026405: Check for 0x prefix in sprintf %p and redo if necessary. Works around cygwin issue.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWindow.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index 1c2745c..95e7a16 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWindow.c,v 1.16 2008/04/27 22:39:17 dkf Exp $ + * RCS: @(#) $Id: tkWinWindow.c,v 1.17 2008/07/26 11:17:25 patthoyts Exp $ */ #include "tkWinInt.h" @@ -174,9 +174,12 @@ TkpPrintWindowId( /* * Use pointer representation, because Win64 is P64 (*not* LP64). Windows * doesn't print the 0x for %p, so we do it. + * bug #2026405: cygwin does output 0x for %p so test and recover. */ sprintf(buf, "0x%p", hwnd); + if (buf[2] == '0' && buf[3] == 'x') + sprintf(buf, "%p", hwnd); } /* |