mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Fix script/inline-c-relative-includes.go.
This commit is contained in:
1 parent
aec5715f12
commit
e3643574d7
1 file changed
+3
-3
@@ -80,9 +80,9 @@ func do(w *bufio.Writer, dir string, filename string, depth int) error {
|
||||
|
||||
r := bufio.NewScanner(f)
|
||||
for r.Scan() {
|
||||
s := r.Bytes()
|
||||
line := r.Bytes()
|
||||
|
||||
if bytes.HasPrefix(s, prefix) {
|
||||
if s := line; bytes.HasPrefix(s, prefix) {
|
||||
s = s[len(prefix):]
|
||||
if bytes.HasSuffix(s, suffix) {
|
||||
s = s[:len(s)-len(suffix)]
|
||||
@@ -98,7 +98,7 @@ func do(w *bufio.Writer, dir string, filename string, depth int) error {
|
||||
}
|
||||
}
|
||||
|
||||
w.Write(s)
|
||||
w.Write(line)
|
||||
w.WriteByte('\n')
|
||||
}
|
||||
return r.Err()
|
||||
|
||||
Reference in new issue
Block a user