mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
I have no idea what Simon thought he was doing casting what was once a
struct sbcs_data * (first element an array of unsigned long) into a wchar_t *, but I think it's reasonably safe to assume that it was a mistake. [originally from svn r2399]
This commit is contained in:
parent
c66bf11fa1
commit
be63146e4f
@ -16,18 +16,18 @@ void read_sbcs(charset_spec const *charset, long int input_chr,
|
||||
charset_state *state,
|
||||
void (*emit)(void *ctx, long int output), void *emitctx)
|
||||
{
|
||||
wchar_t const *table = (wchar_t const *)charset->data;
|
||||
const struct sbcs_data *sd = charset->data;
|
||||
|
||||
UNUSEDARG(state);
|
||||
|
||||
emit(emitctx, table[input_chr]);
|
||||
emit(emitctx, sd->sbcs2ucs[input_chr]);
|
||||
}
|
||||
|
||||
void write_sbcs(charset_spec const *charset, long int input_chr,
|
||||
charset_state *state,
|
||||
void (*emit)(void *ctx, long int output), void *emitctx)
|
||||
{
|
||||
wchar_t const *table = (wchar_t const *)charset->data;
|
||||
const struct sbcs_data *sd = charset->data;
|
||||
int i;
|
||||
|
||||
UNUSEDARG(state);
|
||||
@ -37,7 +37,7 @@ void write_sbcs(charset_spec const *charset, long int input_chr,
|
||||
* We should be using the ucs2sbcs table.
|
||||
*/
|
||||
for (i = 0; i < 256; i++)
|
||||
if (table[i] == input_chr) {
|
||||
if (sd->sbcs2ucs[i] == input_chr) {
|
||||
emit(emitctx, i);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user