From 253d36e96328db44de556256d9c2bd97445cc36b Mon Sep 17 00:00:00 2001 From: Antoni Sawicki Date: Sun, 2 Jun 2019 16:18:53 -0700 Subject: [PATCH] better handling of ismap variable --- wrp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrp.go b/wrp.go index 29b6358..6e23a79 100644 --- a/wrp.go +++ b/wrp.go @@ -156,7 +156,7 @@ func capture(gourl string, w int64, h int64, s float64, p int64, i bool, c strin var loc string var res *runtime.RemoteObject is := make([]Ismap, 0) - var istr string + var ion string log.Printf("%s Processing Caputure Request for %s\n", c, gourl) @@ -204,7 +204,7 @@ func capture(gourl string, w int64, h int64, s float64, p int64, i bool, c strin if i { fmt.Fprintf(out, "\"wrp\"", mappath, imgpath) is = append(is, Ismap{xmin: -1, xmax: -1, ymin: -1, ymax: -1, url: fmt.Sprintf("/?url=%s&w=%d&h=%d&s=%1.2f&i=on", loc, w, h, s)}) - istr = "i=on" + ion = "&i=on" } else { fmt.Fprintf(out, "\"wrp\"\n\n", imgpath) } @@ -218,7 +218,7 @@ func capture(gourl string, w int64, h int64, s float64, p int64, i bool, c strin if err != nil { continue } - target := fmt.Sprintf("/?url=%s&w=%d&h=%d&s=%1.2f&%s", tgt, w, h, s, istr) // no page# here + target := fmt.Sprintf("/?url=%s&w=%d&h=%d&s=%1.2f%s", tgt, w, h, s, ion) // no page# here if len(b.Content) > 6 && len(target) > 7 { if i {