Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix pin wraparound on target
  • Loading branch information
carrotIndustries committed May 11, 2018
1 parent ec5b3ca commit a306322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/app/otp/app.c
Expand Up @@ -8,7 +8,7 @@ static int32_t pin_get(void *ud) {

static void pin_set(uint8_t dig, int8_t dir, void *user_data) {
int16_t inc = dir*ipow(10, dig);
pin = CLAMP(pin+inc, 0, 9999);
pin = CLAMP(((int16_t)pin)+inc, 0L, 9999L);
}

static void pin_leave(void *ud) {
Expand Down

0 comments on commit a306322

Please sign in to comment.