Skip to content

Commit f647718

Browse files
committed
cast parameter to int
1 parent 5141179 commit f647718

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "croquis.js",
33
"main": "croquis.js",
4-
"version": "0.2.2",
4+
"version": "0.2.3",
55
"homepage": "https://github.com/disjukr/croquis.js",
66
"authors": [
77
"JongChan Choi <disjukr@naver.com>"

croquis.js

+2
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ function Croquis(imageDataList, properties) {
619619
};
620620
}
621621
self.pickColor = function (x, y, index) {
622+
x = x | 0; // cast to int
623+
y = y | 0;
622624
if ((x < 0) || (x >= size.width) || (y < 0) || (y >= size.height))
623625
return null;
624626
index = (index == null) ? layerIndex : index;

0 commit comments

Comments
 (0)