summaryrefslogtreecommitdiffstats
path: root/win/tkWinFont.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-09-20 20:35:14 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-09-20 20:35:14 (GMT)
commit3b5560d0e3e51e8b8a862ebbde29d365a7c69d96 (patch)
tree985e9572b82791d64b505cadf43ecefa47918205 /win/tkWinFont.c
parentf8ca82ac5b16009ef945379f1f3ac64544c2590b (diff)
downloadtk-3b5560d0e3e51e8b8a862ebbde29d365a7c69d96.zip
tk-3b5560d0e3e51e8b8a862ebbde29d365a7c69d96.tar.gz
tk-3b5560d0e3e51e8b8a862ebbde29d365a7c69d96.tar.bz2
Fix [0338867c74]: Windows text widget hang Phaistos font installed
Diffstat (limited to 'win/tkWinFont.c')
-rw-r--r--win/tkWinFont.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 5eed32c..c24cd5f 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -2748,7 +2748,7 @@ LoadFontRanges(
* range information. */
int *symbolPtr)
{
- int n, i, swapped, offset, cbData, segCount;
+ int n, i, j, k, swapped, offset, cbData, segCount;
DWORD cmapKey;
USHORT *startCount, *endCount;
CMAPTABLE cmapTable;
@@ -2824,9 +2824,9 @@ LoadFontRanges(
offset += cbData + sizeof(USHORT);
GetFontData(hdc, cmapKey, (DWORD) offset, startCount, cbData);
if (swapped) {
- for (i = 0; i < segCount; i++) {
- SwapShort(&endCount[i]);
- SwapShort(&startCount[i]);
+ for (j = 0; j < segCount; j++) {
+ SwapShort(&endCount[j]);
+ SwapShort(&startCount[j]);
}
}
if (*symbolPtr != 0) {
@@ -2842,11 +2842,11 @@ LoadFontRanges(
* 8-bit characters [note Bug: 2406]
*/
- for (i = 0; i < segCount; i++) {
- if (((startCount[i] & 0xff00) == 0xf000)
- && ((endCount[i] & 0xff00) == 0xf000)) {
- startCount[i] &= 0xff;
- endCount[i] &= 0xff;
+ for (k = 0; k < segCount; k++) {
+ if (((startCount[k] & 0xff00) == 0xf000)
+ && ((endCount[k] & 0xff00) == 0xf000)) {
+ startCount[k] &= 0xff;
+ endCount[k] &= 0xff;
}
}
}