fix small warning (#202)

* 111

2222

* fix small warning

* remove

remove
This commit is contained in:
Tennn 2017-09-01 01:44:11 +08:00 committed by radare
parent a71f2a8b27
commit 142f0941c4

View File

@ -163,14 +163,14 @@ void createNewDialog::on_buttonCreate_clicked()
{ {
char file[32]; char file[32];
QByteArray hexpairs = ui->plainTextEdit->toPlainText().toUtf8(); QByteArray hexpairs = ui->plainTextEdit->toPlainText().toUtf8();
int sz = strlen(hexpairs.constData()); size_t sz = strlen(hexpairs.constData());
if (sz > 0) if (sz > 0)
{ {
snprintf(file, sizeof(file) - 1, "malloc://%d", sz); snprintf(file, sizeof(file) - 1, "malloc://%d", (int)sz);
if (w->core->loadFile(file, 0, 0, 1, 0, 0, false)) if (w->core->loadFile(file, 0, 0, 1, 0, 0, false))
{ {
created = true; created = true;
r_core_write_at(lcore, 0, (const ut8 *)hexpairs.constData(), sz); r_core_write_at(lcore, 0, (const ut8 *)hexpairs.constData(), (int)sz);
} }
else else
{ {