Commit fea14ad
committed
fix: prevent ArgumentOutOfRangeException in XRefHrefFixer.FixPackage
P0.3 — MethodNameRegex requires '(' in the name to match. When it does
not match, Groups[1].Value is "" causing name.Substring(0, 0) = "" and
uid.IndexOf("") == 0, so uid.Substring(0, -1) threw. Fix: fall back to
using name directly when the regex does not match.
P0.2 — IndexOf returns -1 when methodName or name is not present in uid,
making Substring(0, -2) throw. Fix: guard both call sites; when the name
is absent from uid, return a best-effort href using the uid directly with
non-word characters replaced by underscores.
https://claude.ai/code/session_01WNaTJnpDwNjqyfL1uhYqJ41 parent 9e2743f commit fea14ad
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
45 | 55 | | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
| |||
0 commit comments