Skip to content

Commit 62ca709

Browse files
committed
fix(isutf8): Reset char to 0 when moving to a new line
1 parent 01a2b69 commit 62ca709

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/isutf8/cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ func checkFile(cmd *cobra.Command, path string) error {
8282

8383
switch r {
8484
case '\n':
85+
i = 0
8586
line++
8687
case utf8.RuneError:
8788
if _, err := fmt.Fprintf(cmd.OutOrStdout(),

0 commit comments

Comments
 (0)