Skip to content

Commit

Permalink
Argument checking for getPixelColor.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Jan 8, 2016
1 parent ad7e5dc commit 4a5572f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ NAN_METHOD(setKeyboardDelay)

NAN_METHOD(getPixelColor)
{
if (info.Length() != 2)
{
return Nan::ThrowError("Invalid number of arguments.");
}

MMBitmapRef bitmap;
MMRGBHex color;

Expand Down

0 comments on commit 4a5572f

Please sign in to comment.