Skip to content

Commit c9df582

Browse files
committed
Prevent division by zero.
See stomita/ios-imagefile-megapixel@5b2252cc14d412 24682f06c098c1b44fef0258d5
1 parent 8e7c998 commit c9df582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

load-image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
}
107107
py = (ey + sy) >> 1;
108108
}
109-
return py / ih;
109+
return (py / ih) || 1;
110110
};
111111

112112
// Renders image to canvas while working around iOS image scaling bugs:

0 commit comments

Comments
 (0)