Skip to content

Commit

Permalink
Do not convert PWS details to latin1 before writing to device #131
Browse files Browse the repository at this point in the history
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
  • Loading branch information
szszszsz committed Sep 1, 2016
1 parent fd7e5d8 commit 3ebebc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3668,19 +3668,19 @@ void MainWindow::on_PWS_ButtonSaveSlot_clicked() {

Slot = ui->PWS_ComboBoxSelectSlot->currentIndex();

STRNCPY((char *)SlotName, sizeof(SlotName), ui->PWS_EditSlotName->text().toLatin1(),
STRNCPY((char *)SlotName, sizeof(SlotName), ui->PWS_EditSlotName->text().toUtf8(),
PWS_SLOTNAME_LENGTH);
SlotName[PWS_SLOTNAME_LENGTH] = 0;
if (0 == strlen((char *)SlotName)) {
csApplet->warningBox(tr("Please enter a slotname."));
return;
}

STRNCPY((char *)LoginName, sizeof(LoginName), ui->PWS_EditLoginName->text().toLatin1(),
STRNCPY((char *)LoginName, sizeof(LoginName), ui->PWS_EditLoginName->text().toUtf8(),
PWS_LOGINNAME_LENGTH);
LoginName[PWS_LOGINNAME_LENGTH] = 0;

STRNCPY((char *)Password, sizeof(Password), ui->PWS_EditPassword->text().toLatin1(),
STRNCPY((char *)Password, sizeof(Password), ui->PWS_EditPassword->text().toUtf8(),
PWS_PASSWORD_LENGTH);
Password[PWS_PASSWORD_LENGTH] = 0;
if (0 == strlen((char *)Password)) {
Expand Down

0 comments on commit 3ebebc2

Please sign in to comment.