1
0
Fork 0

GUI: resolved issue #617 (crash on binary fill with empty pattern)

This commit is contained in:
mrexodia 2016-03-31 04:27:49 +02:00
parent d519043b06
commit 9fb0eff70e
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ void QHexEdit::fill(int index, const QString & pattern)
if((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || (wildcardEnabled() && ch == '?'))
convert += ch;
}
if(!convert.length())
return;
if(convert.length() % 2) //odd length
convert += "0";
QByteArray data(convert.length(), 0);