diff --git a/HISTORY.md b/HISTORY.md
index 44a7b0f5..2f4b49de 100755
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -2,8 +2,13 @@
## in development:
+* **Notable Fixes:**
+ * fixed a costume-shrinkWrap edgecase bug, thanks, Brian, for reporting it!
+
+
### 2020-11-09
* new dev version
+* objects: fixed #2712 - a costume-shrinkWrap edgecase bug, thanks, Brian, for reporting it!
## 6.3.1
* **Notable Fixes:**
diff --git a/snap.html b/snap.html
index e5ff6f9e..acc1b1c5 100755
--- a/snap.html
+++ b/snap.html
@@ -10,7 +10,7 @@
-
+
diff --git a/src/objects.js b/src/objects.js
index c46ee2b7..c8869fd1 100644
--- a/src/objects.js
+++ b/src/objects.js
@@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph,
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
AlignmentMorph, Process, WorldMap, copyCanvas, useBlurredShadows*/
-modules.objects = '2020-November-05';
+modules.objects = '2020-November-09';
var SpriteMorph;
var StageMorph;
@@ -9689,8 +9689,8 @@ Costume.prototype.canvasBoundingBox = function (pic) {
}
function getLeft() {
- for (col = 0; col <= w; col += 1) {
- for (row = 0; row <= h; row += 1) {
+ for (col = 0; col < w; col += 1) {
+ for (row = 0; row < h; row += 1) {
if (getAlpha(col, row)) {
return col;
}
@@ -9700,8 +9700,8 @@ Costume.prototype.canvasBoundingBox = function (pic) {
}
function getTop() {
- for (row = 0; row <= h; row += 1) {
- for (col = 0; col <= w; col += 1) {
+ for (row = 0; row < h; row += 1) {
+ for (col = 0; col < w; col += 1) {
if (getAlpha(col, row)) {
return row;
}
@@ -9711,8 +9711,8 @@ Costume.prototype.canvasBoundingBox = function (pic) {
}
function getRight() {
- for (col = w; col >= 0; col -= 1) {
- for (row = h; row >= 0; row -= 1) {
+ for (col = w - 1; col >= 0; col -= 1) {
+ for (row = h - 1; row >= 0; row -= 1) {
if (getAlpha(col, row)) {
return Math.min(col + 1, w);
}
@@ -9722,8 +9722,8 @@ Costume.prototype.canvasBoundingBox = function (pic) {
}
function getBottom() {
- for (row = h; row >= 0; row -= 1) {
- for (col = w; col >= 0; col -= 1) {
+ for (row = h - 1; row >= 0; row -= 1) {
+ for (col = w - 1; col >= 0; col -= 1) {
if (getAlpha(col, row)) {
return Math.min(row + 1, h);
}