diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..4cbfc30 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,26 @@ +name: "CodeQL" + +on: + push: + branches: [ master ] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: 'go' + + - name: CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/store.go b/store.go index 89443c6..f50873c 100644 --- a/store.go +++ b/store.go @@ -49,7 +49,7 @@ type Store interface { // where X is 'i' or 'o' func mIDFromKey(key string) uint16 { s := key[2:] - i, err := strconv.Atoi(s) + i, err := strconv.ParseUint(s, 10, 16) chkerr(err) return uint16(i) }