From 9fade6368cf83c08e3bd331ae5f6e750c98ab245 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Sun, 24 Jun 2018 13:33:59 -0700 Subject: [PATCH] Correct the type of macro delay variables --- right/src/config_parser/parse_macro.c | 2 +- right/src/macros.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/right/src/config_parser/parse_macro.c b/right/src/config_parser/parse_macro.c index 416d76a..23edb45 100644 --- a/right/src/config_parser/parse_macro.c +++ b/right/src/config_parser/parse_macro.c @@ -60,7 +60,7 @@ parser_error_t parseScrollMouseMacroAction(config_buffer_t *buffer, macro_action parser_error_t parseDelayMacroAction(config_buffer_t *buffer, macro_action_t *macroAction) { - int16_t delay = ReadInt16(buffer); + uint16_t delay = ReadUInt16(buffer); macroAction->type = MacroActionType_Delay; macroAction->delay.delay = delay; diff --git a/right/src/macros.h b/right/src/macros.h index 6eecc1a..1fded26 100644 --- a/right/src/macros.h +++ b/right/src/macros.h @@ -55,7 +55,7 @@ int16_t y; } ATTR_PACKED scrollMouse; struct { - int16_t delay; + uint16_t delay; } ATTR_PACKED delay; struct { const char *text;