Check data length

This commit is contained in:
obscuren 2014-08-23 15:30:23 +02:00
parent ded013b7a7
commit 444c9effdb
3 changed files with 1 additions and 3 deletions

View File

@ -106,7 +106,6 @@ Rectangle {
}
}
}
}
Menu {

View File

@ -43,7 +43,6 @@ ApplicationWindow {
// Takes care of loading all default plugins
Component.onCompleted: {
var walletView = addPlugin("./views/wallet.qml", {noAdd: true, section: "ethereum", active: true})
var historyView = addPlugin("./views/history.qml", {noAdd: true, section: "legacy"})
var newTxView = addPlugin("./views/transaction.qml", {noAdd: true, section: "legacy"})
var chainView = addPlugin("./views/chain.qml", {noAdd: true, section: "legacy"})
var infoView = addPlugin("./views/info.qml", {noAdd: true, section: "legacy"})

View File

@ -53,7 +53,7 @@ func (self *UiLib) LookupDomain(domain string) string {
data := world.Config().Get("DnsReg").StorageString(domain).Bytes()
// Left padded = A record, Right padded = CNAME
if data[0] == 0 {
if len(data) > 0 && data[0] == 0 {
data = bytes.TrimLeft(data, "\x00")
var ipSlice []string
for _, d := range data {