Skip to content

Commit

Permalink
EditDialog: Fix text editor when NULL chars are typed in hex editor
Browse files Browse the repository at this point in the history
When using the hex editor widget of the Edit Dialog to insert a NULL
character and then changing to the text editor without saving and
reopening the window first lead to the text being truncated at the NULL
character.
  • Loading branch information
MKleusberg committed Jun 12, 2014
1 parent b407704 commit 2b65bbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EditDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void EditDialog::editTextChanged()
void EditDialog::hexDataChanged()
{
// Update the text editor accordingly
ui->editorText->setPlainText(hexEdit->data());
ui->editorText->setPlainText(QString::fromUtf8(hexEdit->data().constData(), hexEdit->data().size()));
}

void EditDialog::checkDataType()
Expand Down

0 comments on commit 2b65bbc

Please sign in to comment.