This commit is contained in:
Maxim Devaev 2025-07-28 17:11:12 +03:00
parent e5cee0ec5e
commit dc7f38a1b6

View File

@ -129,7 +129,7 @@ class HidApi:
@exposed_http("POST", "/hid/print") @exposed_http("POST", "/hid/print")
async def __print_handler(self, req: Request) -> Response: async def __print_handler(self, req: Request) -> Response:
text = await req.text() text = await req.text()
limit = int(valid_int_f0(req.query.get("limit", 1024))) limit = valid_int_f0(req.query.get("limit", 1024))
if limit > 0: if limit > 0:
text = text[:limit] text = text[:limit]
symmap = self.__ensure_symmap(req.query.get("keymap", self.__default_keymap_name)) symmap = self.__ensure_symmap(req.query.get("keymap", self.__default_keymap_name))