Skip to content

Commit efdb798

Browse files
committed
(#6) Updated parameter types for highlight
1 parent 1403311 commit efdb798

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/libnut.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <vector>
33
#include <sstream>
44
#include <iostream>
5+
#include <cstdint>
56
#include "mouse.h"
67
#include "buffer_finalizer.h"
78
#include "deadbeef_rand.h"
@@ -713,11 +714,11 @@ Napi::Number _setXDisplayName(const Napi::CallbackInfo &info)
713714
Napi::Number _highlight(const Napi::CallbackInfo &info)
714715
{
715716
Napi::Env env = info.Env();
716-
int x;
717-
int y;
718-
int width;
719-
int height;
720-
int duration;
717+
int32_t x;
718+
int32_t y;
719+
int32_t width;
720+
int32_t height;
721+
long duration;
721722
float opacity;
722723

723724
if (info.Length() == 6)
@@ -726,7 +727,7 @@ Napi::Number _highlight(const Napi::CallbackInfo &info)
726727
y = info[1].As<Napi::Number>().Int32Value();
727728
width = info[2].As<Napi::Number>().Int32Value();
728729
height = info[3].As<Napi::Number>().Int32Value();
729-
duration = info[4].As<Napi::Number>().Int32Value();
730+
duration = info[4].As<Napi::Number>().Int64Value();
730731
opacity = info[5].As<Napi::Number>().FloatValue();
731732

732733
highlight(x, y, width, height, duration, opacity);

0 commit comments

Comments
 (0)