Commit a0dc97a
fix: check IndexByte return before adding in tagLength
tagLength() adds the return value of bytes.IndexByte directly to the
current index. When '>' is not found, IndexByte returns -1, which
decrements i instead of making it negative. The guard `if i < 0`
never triggers, causing leftAngle() to silently skip characters.
Store the IndexByte result in a separate variable and check it before
adding to i.1 parent 554ac1d commit a0dc97a
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1289 | 1297 | | |
1290 | 1298 | | |
1291 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | | - | |
1077 | | - | |
| 1076 | + | |
| 1077 | + | |
1078 | 1078 | | |
1079 | 1079 | | |
| 1080 | + | |
1080 | 1081 | | |
1081 | 1082 | | |
1082 | 1083 | | |
| |||
0 commit comments