Skip to content

Some small bugs #1

@Bob337

Description

@Bob337

Bugs Found:

Pin Number Display Issue:

For locks with pinsStartAtZero: false, the display showed pins[i] instead of pins[i] + 1
This caused confusion - a pin value of 0 should display as "1" for standard locks

Random Generation Bug:

javascript   // Original (problematic):
   Math.floor(Math.random() * maxKeyCut - 1) + 1
   // This could produce negative values!
   
   // Fixed:
   Math.floor(Math.random() * maxKeyCut)

Navigation Boundary Issues:

selectedPinIndex could exceed valid range
Missing modulo wrap-around in some cases

Storage API Mismatch:

Original code uses storage.read() and storage.write() but these may not exist on all devices

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions