Skip to content

Commit 30dc5a6

Browse files
committed
fix: upstream fixes
upstream now uses int8_t for the mino position, but only internally, we have to cast it, since on storage it is guaranteed to be uint8_t
1 parent 9044e98 commit 30dc5a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cpp/convert.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,11 @@ static v8::Local<v8::Value> mino_position_to_js(v8::Isolate* isolate, const grid
190190

191191
v8::Local<v8::Object> result = Nan::New<v8::Object>();
192192

193-
auto js_x = Nan::New<v8::Uint32>(mino_position.x);
193+
auto mino_pos = mino_position.cast<uint8_t>();
194194

195-
auto js_y = Nan::New<v8::Uint32>(mino_position.y);
195+
auto js_x = Nan::New<v8::Uint32>(mino_pos.x);
196+
197+
auto js_y = Nan::New<v8::Uint32>(mino_pos.y);
196198

197199
std::vector<std::pair<std::string, v8::Local<v8::Value>>> properties_vector{
198200
{ "x", js_x },

0 commit comments

Comments
 (0)