fix(info): handle missing deps field without unsigned indexOf wrap
This commit is contained in:
@@ -23,3 +23,16 @@ _Auto-scaffolded by /start-work. Append new entries below - never overwrite._
|
||||
|
||||
**Workaround in smoketest:** Recipe includes `deps = {}` to avoid triggering this bug.
|
||||
|
||||
---
|
||||
|
||||
## RESOLVED (task 27)
|
||||
|
||||
**Fixed:** `scanDepsArray` in `src/tofu/commands/info.d` — `size_t pos` → `ptrdiff_t pos`
|
||||
so the `pos < 0` guard fires on `indexOf` returning -1. Added a regression unittest
|
||||
(recipe without deps → infoCommand returns 0). Audit of the same pattern across
|
||||
`info.d` (line 36), `recipeparse.d` (52, 112), `fetch.d` (82), `search.d`, `remove.d`,
|
||||
`install.d` found no other unsigned indexOf assignment (`auto` infers `ptrdiff_t`
|
||||
everywhere else).
|
||||
|
||||
Verified: `dub build` ✓, `dub test` — 23 modules passed ✓, smoketest — 16 checks PASS ✓.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user