Skip to content

Commit e75d99e

Browse files
BrianLeishmanclaude
andcommitted
fix: use actual parsed string in literal size error message
The error format string was logging s[i+1:j] (which includes '+' from LITERAL+ syntax) but Atoi receives s[i+1:sizeEnd] (numeric only). Log the same string that was actually passed to Atoi. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 812d3b2 commit e75d99e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func findFetchContentEnd(s string, fetchContentStart int) (int, error) {
298298
}
299299
size, err := strconv.Atoi(s[i+1 : sizeEnd])
300300
if err != nil {
301-
return 0, fmt.Errorf("parse literal size %q: %w", s[i+1:j], err)
301+
return 0, fmt.Errorf("parse literal size %q: %w", s[i+1:sizeEnd], err)
302302
}
303303

304304
i = j + 1

0 commit comments

Comments
 (0)