From 0f5ced0521fb54095cc88249a8ffebf10ca17221 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 31 Mar 2022 19:14:35 +0100 Subject: [PATCH] claim back a few bytes --- quantum/xap/xap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quantum/xap/xap.c b/quantum/xap/xap.c index 98a6c9902a..a5d8b3cc0d 100644 --- a/quantum/xap/xap.c +++ b/quantum/xap/xap.c @@ -107,8 +107,12 @@ void xap_execute_route(xap_token_t token, const xap_route_t *routes, size_t max_ break; case XAP_GETTER: - xap_respond_u32(token, (route.u32getter)()); - return; + if (route.u32getter != NULL) { + const uint32_t ret = (route.u32getter)(); + xap_respond_data(token, &ret, sizeof(ret)); + return; + } + break; case XAP_VALUE: xap_respond_data(token, route.const_data, route.const_data_len);