Permalink
Browse files

prevent 0 division, fix #11

  • Loading branch information...
1 parent 9cbbafc commit 5b2252cc14d41224682f06c098c1b44fef0258d5 @revolunet revolunet committed Feb 19, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/megapix-image.js
View
@@ -54,7 +54,8 @@
}
py = (ey + sy) >> 1;
}
- return py / ih;
+ var ratio = (py / ih);
+ return (ratio===0)?1:ratio;
}
/**

0 comments on commit 5b2252c

Please sign in to comment.