Mercurial > louis > kiibohd-controller
changeset 215:00a8c7f491d4
Fixing first and last element bug for layers.
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 16 Sep 2014 17:21:41 -0700 |
parents | 5a5404338b9f |
children | 738445f38639 |
files | Macro/PartialMap/macro.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Macro/PartialMap/macro.c Tue Sep 16 17:04:59 2014 -0700 +++ b/Macro/PartialMap/macro.c Tue Sep 16 17:21:41 2014 -0700 @@ -323,8 +323,8 @@ // Determine if layer has key defined // Make sure scanCode is between layer first and last scancodes if ( map != 0 - && scanCode < layer->last - && scanCode > layer->first + && scanCode <= layer->last + && scanCode >= layer->first && *map[ scanCode - layer->first ] != 0 ) { return map[ scanCode - layer->first ]; @@ -340,8 +340,8 @@ // Make sure scanCode is between layer first and last scancodes if ( map != 0 - && scanCode < layer->last - && scanCode > layer->first + && scanCode <= layer->last + && scanCode >= layer->first && *map[ scanCode - layer->first ] != 0 ) { return map[ scanCode - layer->first ];