diff --git a/src/spice2x/api/modules/drs.cpp b/src/spice2x/api/modules/drs.cpp index 2538ee0..0cff527 100644 --- a/src/spice2x/api/modules/drs.cpp +++ b/src/spice2x/api/modules/drs.cpp @@ -34,7 +34,7 @@ namespace api::modules { void DRS::touch_set(Request &req, Response &res) { // get all touch points - games::drs::drs_touch_t touches[16]; + auto touches = std::make_unique(req.params.Size()); size_t i = 0; for (Value ¶m : req.params.GetArray()) { @@ -86,6 +86,6 @@ namespace api::modules { } // apply touch points - games::drs::fire_touches(touches, i); + games::drs::fire_touches(touches.get(), i); } }