diff options
author | Joe Mistachkin <joe@mistachkin.com> | 2003-05-10 07:43:17 (GMT) |
---|---|---|
committer | Joe Mistachkin <joe@mistachkin.com> | 2003-05-10 07:43:17 (GMT) |
commit | 018e17294ffa809191407cb8fbd7d00935659198 (patch) | |
tree | 0f9e87a716c0f5b0cd4ae2d77021fe5de5825745 /tools | |
parent | 833b7573d3e5fb7d56fa25f55520d05922b1896f (diff) | |
download | tcl-018e17294ffa809191407cb8fbd7d00935659198.zip tcl-018e17294ffa809191407cb8fbd7d00935659198.tar.gz tcl-018e17294ffa809191407cb8fbd7d00935659198.tar.bz2 |
fix for [Bug 733221]
Diffstat (limited to 'tools')
-rw-r--r-- | tools/encoding/txt2enc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/encoding/txt2enc.c b/tools/encoding/txt2enc.c index 73870bf..7ce85ef 100644 --- a/tools/encoding/txt2enc.c +++ b/tools/encoding/txt2enc.c @@ -92,7 +92,7 @@ main(int argc, char **argv) case 'm': fixmissing = 0; break; - + default: goto usage; } @@ -174,7 +174,7 @@ main(int argc, char **argv) if (enc < 32 || uni < 32) { continue; } - + hi = enc >> 8; lo = enc & 0xff; if (toUnicode[hi] == NULL) { @@ -183,7 +183,7 @@ main(int argc, char **argv) } toUnicode[hi][lo] = uni; } - + fclose(fp); dot = strrchr(argv[argc - 1], '.'); @@ -228,7 +228,7 @@ main(int argc, char **argv) } } printf("%c\n%04X %d %d\n", "SDM"[type], fallbackChar, symbol, used); - + for (hi = 0; hi < 256; hi++) { if (toUnicode[hi] != NULL) { printf("%02X\n", hi); @@ -240,5 +240,12 @@ main(int argc, char **argv) } } } + + for (hi = 0; hi < 256; hi++) { + if (toUnicode[hi] != NULL) { + free(toUnicode[hi]); + toUnicode[hi] = NULL; + } + } return 0; } |