X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTrans.cpp;h=8a74b9ab4c016f949bf598acb523743bd9e0089d;hb=c57d04908f9746a3923c36c0f41e1e23c6043550;hp=0e7d561c4e3bc891ba81f36767375123e07c7bbe;hpb=fb3bb6361c974802ab92156da1172faacd0ef641;p=lyx.git diff --git a/src/Trans.cpp b/src/Trans.cpp index 0e7d561c4e..8a74b9ab4c 100644 --- a/src/Trans.cpp +++ b/src/Trans.cpp @@ -190,10 +190,10 @@ void Trans::addDeadkey(tex_accent accent, docstring const & keys) // FIXME This is a hack. // tmp is no valid UCS4 string, but misused to store the // accent. - docstring tmp; - tmp += char_type(0); - tmp += char_type(accent); - keymap_[keys[i]] = tmp; + docstring tmpd; + tmpd += char_type(0); + tmpd += char_type(accent); + keymap_[keys[i]] = tmpd; } } @@ -280,10 +280,14 @@ int Trans::load(Lexer & lex) && it->second[1] == accent_2) break; } + + // could not find accent2 on a key -- this should not happen. + if (it == end) + return -1; + docstring allowed; if (!lex.next()) return -1; - allowed = lex.getDocString(); LYXERR(Debug::KBMAP, "allowed: " << to_utf8(allowed)); @@ -429,10 +433,9 @@ tex_accent getkeymod(string const & p) // TransFSMData -TransFSMData::TransFSMData() +TransFSMData::TransFSMData() : deadkey_(0), deadkey2_(0), init_state_(0), + deadkey_state_(0), combined_state_(0), currentState(0) { - deadkey_ = deadkey2_ = 0; - deadkey_info_.accent = deadkey2_info_.accent = TEX_NOACCENT; }