<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -266,7 +266,7 @@ public:
         //zeroy: if globalMin_ is negative, we want to plot positive and
         //negative bars so that they go from zeroy to the plot point
         //(zeroy is in screen (y increases down) coordinates)
-        int zeroy = tileHeight_;
+        int zeroy = tileHeight_ - 1;
         if (globalMin_ &lt; 0) zeroy = (int)(globalMax_ * scale);
         int meany, ystart, yend;
         for (x = 0; x &lt; tileWidthPixels_; x++) {
@@ -280,8 +280,8 @@ public:
                 tileHeight_ 
                 - (int)((((sumVals_[x] / (float)valsPerPx_[x]) - globalMin_)
                          * scale));
-            meany = (meany &lt; 0) ? 0 : meany;
-            meany = (meany &gt;= tileHeight_) ? tileHeight_ - 1 : meany;
+            meany = max(0, meany);
+            meany = min(tileHeight_ - 1, meany);
 
             ystart = min(meany, zeroy);
             yend = max(meany, zeroy);
@@ -430,7 +430,6 @@ public:
                 case BED: {
                     bool ok = true;
                     int startBase, endBase;
-                    float value;
                     chrom_ = word;
                     allChroms_.insert(chrom_);
                     if (ok) {
@@ -443,7 +442,7 @@ public:
                     }
                     if (ok) {
                         ss &gt;&gt; word;
-                        ok = from_string&lt;float&gt;(value, word, dec);
+                        ok = from_string&lt;float&gt;(sample, word, dec);
                     }
                     if (!ok)
                         throw ParseFailure();</diff>
      <filename>src/wig2png.cc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d7f84acaefade8bad7cd62a7ff70cc2007fbb9d4</id>
    </parent>
  </parents>
  <author>
    <name>Mitch Skinner</name>
    <email>mitch_skinner@berkeley.edu</email>
  </author>
  <url>http://github.com/jbrowse/jbrowse/commit/791b4265e0c583c5d6e2b6815bb869981cf72178</url>
  <id>791b4265e0c583c5d6e2b6815bb869981cf72178</id>
  <committed-date>2009-05-27T18:01:12-07:00</committed-date>
  <authored-date>2009-05-27T18:01:12-07:00</authored-date>
  <message>fix bed format handling, make sure to use tileHeight_ - 1 as max y</message>
  <tree>19af7d6a7afa74acfdef32d8b9476e8233fb0c14</tree>
  <committer>
    <name>Mitch Skinner</name>
    <email>mitch_skinner@berkeley.edu</email>
  </committer>
</commit>
