Check data length

pull/129/head
obscuren 10 years ago
parent ded013b7a7
commit 444c9effdb
  1. 1
      ethereal/assets/qml/views/info.qml
  2. 1
      ethereal/assets/qml/wallet.qml
  3. 2
      ethereal/ui_lib.go

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

@ -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"})

@ -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 {

Loading…
Cancel
Save