diff options
author | mistachkin <mistachkin@noemail.net> | 2003-05-10 07:42:26 (GMT) |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2003-05-10 07:42:26 (GMT) |
commit | 3416875e276cd3c687a58f2f1075266141af783a (patch) | |
tree | d5acbe31815e2bd0553276bc5e7671bea8ad7f9f /tools/encoding | |
parent | 7299a4e8b30b5e74a2316ce124208a9a49ba6e81 (diff) | |
download | tcl-3416875e276cd3c687a58f2f1075266141af783a.zip tcl-3416875e276cd3c687a58f2f1075266141af783a.tar.gz tcl-3416875e276cd3c687a58f2f1075266141af783a.tar.bz2 |
fix for [Bug 733221]
FossilOrigin-Name: d95fa584b3f99cf35e238d869b7e418a9e81c1aa
Diffstat (limited to 'tools/encoding')
-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; } |