Skip to content

Commit 291890c

Browse files
committed
Fixed mouseClick bug on Windows.
1 parent 6e56e16 commit 291890c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/robotjs.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ NAN_METHOD(mouseClick)
8080

8181
if (args.Length() > 0)
8282
{
83-
char *b = (*v8::String::Utf8Value(args[0]->ToString()));
83+
char *b;
84+
85+
v8::String::Utf8Value bstr(args[0]->ToString());
86+
b = *bstr;
8487

8588
if (strcmp(b, "left") == 0)
8689
{

0 commit comments

Comments
 (0)