Skip to content

Commit

Permalink
fix bool short circuit evaluation (#82)
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Apr 12, 2024
1 parent 411cc9a commit fd0796e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion failpoint-toolexec/main.go
Expand Up @@ -88,7 +88,7 @@ func injectFailpoint(argsP *[]string) error {
writer := &code.Rewriter{}
writer.SetAllowNotChecked(true)
for _, idx := range fileIndices {
needExtraFile = needExtraFile || injectFailpointForFile(writer, &args[idx], module)
needExtraFile = injectFailpointForFile(writer, &args[idx], module) || needExtraFile
}
if needExtraFile {
newFile := filepath.Join(tmpFolder, module, "failpoint_toolexec_extra.go")
Expand Down

0 comments on commit fd0796e

Please sign in to comment.