Skip to content

Commit

Permalink
add spell-check, handle 0 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Jun 28, 2024
1 parent f6ad948 commit 281918d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SpellCheck

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]

jobs:
markdown:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install CSpell
run: npm install -g cspell

- name: Run CSpell
run: cspell --config resources/.lint/spell-check/.cspell.json "**/*"
4 changes: 4 additions & 0 deletions project/src/pv_speaker.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ PV_API pv_speaker_status_t pv_speaker_init(
return PV_SPEAKER_STATUS_RUNTIME_ERROR;
}
}
if (count == 0) {
pv_speaker_delete(o);
return PV_SPEAKER_STATUS_RUNTIME_ERROR;
}
if (device_index >= count) {
pv_speaker_delete(o);
return PV_SPEAKER_STATUS_INVALID_ARGUMENT;
Expand Down

0 comments on commit 281918d

Please sign in to comment.