Skip to content

Commit 5f38988

Browse files
authored
Merge pull request #2 from JalonSolov/fix_var_shadow
fix: change local var to no longer shadow global
2 parents 76107f4 + b52e741 commit 5f38988

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ vtcc
55
log
66
**.out
77
vlang
8+
9+
# Intellij files
10+
.idea/
11+
*.iml

src/tcctools.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn tcc_tool_ar(s1 &TCCState, argc int, argv &&u8) int {
7979
tfile := [260]char{}
8080
stmp := [20]char{}
8181

82-
file := &char(0)
82+
cur_file := &char(0)
8383
name := &char(0)
8484

8585
ret := 2
@@ -256,9 +256,9 @@ fn tcc_tool_ar(s1 &TCCState, argc int, argv &&u8) int {
256256
}
257257
}
258258
}
259-
file = argv[i_obj]
259+
cur_file = argv[i_obj]
260260
unsafe {
261-
for name = C.strchr(file, 0); name > file && name[-1] != `/` && name[-1] != `\\`; name-- {
261+
for name = C.strchr(cur_file, 0); name > cur_file && name[-1] != `/` && name[-1] != `\\`; name-- {
262262
}
263263
}
264264
istrlen = C.strlen(name)

0 commit comments

Comments
 (0)